@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { final Type[] classes = annotationInstance.value().asClassArray(); final String[] ret = new String[classes.length]; for(int i = 0; i < classes.length; ++i) { ret[i] = classes[i].name().toString(); } return ret; } }
@Override public String apply(AnnotationType input) { return input.name.toString(); } };
private ClassInfo getAnnotationClass(final AnnotationTarget annotationTarget) { if (annotationTarget instanceof ClassInfo) { return (ClassInfo) annotationTarget; } else if (annotationTarget instanceof MethodInfo) { return ((MethodInfo) annotationTarget).declaringClass(); } else if (annotationTarget instanceof FieldInfo) { return ((FieldInfo) annotationTarget).declaringClass(); } else if (annotationTarget instanceof MethodParameterInfo) { return ((MethodParameterInfo) annotationTarget).method().declaringClass(); } else { throw EeLogger.ROOT_LOGGER.unknownAnnotationTargetType(annotationTarget); } }
public static String[] asOptionalStringArray(AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? new String[0] : value.asStringArray(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AnnotationType) { AnnotationType that = (AnnotationType) obj; return this.name.equals(that.name); } return false; }
@Override public String toString() { return classInfo.toString(); } }
/** * Constructor. * * @param prefix qualified name part * @param simpleName simple class name */ private CdiAnnotations(final DotName prefix, final String simpleName) { this.simpleName = simpleName; this.dotName = DotName.createComponentized(prefix, simpleName); }