net.forthecrown.grenadier.annotations.compiler.CompiledRequires Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grenadier-annotations Show documentation
Show all versions of grenadier-annotations Show documentation
Annotation-based command support for Grenadier
package net.forthecrown.grenadier.annotations.compiler;
import it.unimi.dsi.fastutil.Pair;
import java.util.function.Predicate;
import lombok.RequiredArgsConstructor;
import net.forthecrown.grenadier.CommandSource;
import net.forthecrown.grenadier.annotations.compiler.MemberChain.FieldMember;
import net.forthecrown.grenadier.annotations.compiler.MemberChain.MethodMember;
import net.forthecrown.grenadier.annotations.compiler.MemberChainCompiler.ChainCompileConfig;
import net.forthecrown.grenadier.annotations.tree.RequiresTree.MemberRequires;
import net.forthecrown.grenadier.annotations.util.Result;
import net.forthecrown.grenadier.annotations.util.Utils;
@RequiredArgsConstructor
class CompiledRequires implements Predicate {
static final Class>[] PARAMS = {CommandSource.class};
private final MemberChain chain;
private final Object commandClass;
@Override
public boolean test(CommandSource source) {
Pair
© 2015 - 2025 Weber Informatics LLC | Privacy Policy