public <T extends Annotation> String getAnnotationValue(Class<T> cls, int options) { return manager.getAnnotations().getAnnotationValue(registeredCommand.method, cls, options); }
public <T extends Annotation> String getAnnotationValue(Class<T> cls) { return manager.getAnnotations().getAnnotationValue(registeredCommand.method, cls); }
private String getParentSubcommand(Class<?> clazz) { List<String> subList = new ArrayList<>(); while (clazz != null) { String sub = manager.getAnnotations().getAnnotationValue(clazz, Subcommand.class, Annotations.NOTHING); if (sub != null) { subList.add(sub); } clazz = clazz.getEnclosingClass(); } Collections.reverse(subList); return ACFUtil.join(subList, " "); }
/** * Gets the subcommand name of the method given. * * @param method * The method to check. * * @return The name of the subcommand. It returns null if the input doesn't have {@link Subcommand} attached. */ private String getSubcommandValue(Method method) { final String sub = manager.getAnnotations().getAnnotationValue(method, Subcommand.class, Annotations.NOTHING); if (sub == null) { return null; } Class<?> clazz = method.getDeclaringClass(); String parent = getParentSubcommand(clazz); return parent == null || parent.isEmpty() ? sub : parent + " " + sub; }
public <T extends Annotation> String getAnnotationValue(Class<T> cls) { return manager.getAnnotations().getAnnotationValue(param.getParameter(), cls); }
public <T extends Annotation> boolean hasAnnotation(Class<T> cls) { return manager.getAnnotations().hasAnnotation(param.getParameter(), cls); }
public <T extends Annotation> String getAnnotationValue(Class<T> cls, int options) { return manager.getAnnotations().getAnnotationValue(param.getParameter(), cls, options); }
final Annotations annotations = manager.getAnnotations(); boolean foundDefault = false; boolean foundCatchUnknown = false;
final String[] aliasNames = manager.getAnnotations().getAnnotationValues(method, CommandAlias.class, Annotations.REPLACEMENTS | Annotations.LOWERCASE);
this.manager = manager; final Annotations annotations = manager.getAnnotations(); final Class<? extends BaseCommand> self = this.getClass();
RegisteredCommand(BaseCommand scope, String command, Method method, String prefSubCommand) { this.scope = scope; this.manager = this.scope.manager; final Annotations annotations = this.manager.getAnnotations();
Annotations annotations = manager.getAnnotations();