protected boolean isActiveAnnotation(final JvmAnnotationType annotationType) { EList<JvmAnnotationReference> _annotations = annotationType.getAnnotations(); for (final JvmAnnotationReference anno : _annotations) { String _identifier = anno.getAnnotation().getIdentifier(); String _name = Active.class.getName(); boolean _equals = Objects.equal(_identifier, _name); if (_equals) { return true; } } return false; } }
/** * @return <code>true</code> if this annotation is annotated with Java8 Repeatable meta-annotation. */ public boolean isRepeatable(final JvmAnnotationType annotationType) { for (Iterator<JvmAnnotationReference> iterator = annotationType.getAnnotations().iterator(); iterator.hasNext();) { JvmAnnotationReference metaAnnotation = iterator.next(); if ("java.lang.annotation.Repeatable".equals(metaAnnotation.getAnnotation().getIdentifier())) { return true; } } return false; }
protected boolean isActiveAnnotation(JvmAnnotationType annotationType) { for (JvmAnnotationReference anno : annotationType.getAnnotations()) { JvmAnnotationType annotation = anno.getAnnotation(); if (annotation != null && !annotation.eIsProxy()) { if ("org.eclipse.xtend.lib.macro.Active".equals(annotation.getIdentifier())) { return true; } } } return false; } }
public Set<ElementType> getAnnotationTargets(JvmAnnotationType annotation) { EList<JvmAnnotationReference> annotations = annotation.getAnnotations(); for (JvmAnnotationReference annoRef : annotations) { if (Target.class.getName().equals(annoRef.getAnnotation().getIdentifier())) { EList<JvmAnnotationValue> values = annoRef.getValues(); JvmAnnotationValue value = values.isEmpty() ? null : values.get(0); if (value instanceof JvmEnumAnnotationValue) { Set<ElementType> result = newHashSet(); for (JvmEnumerationLiteral elementType : ((JvmEnumAnnotationValue) value).getValues()) { final String simpleName = elementType.getSimpleName(); result.add(ElementType.valueOf(simpleName)); } return result; } } } return emptySet(); }
return Boolean.valueOf(Objects.equal(_identifier, _name)); }; final JvmAnnotationReference activeAnnotation = IterableExtensions.<JvmAnnotationReference>findFirst(it.getAnnotations(), _function); final Function1<JvmAnnotationValue, Boolean> _function_1 = (JvmAnnotationValue it_1) -> { return Boolean.valueOf(((it_1.getOperation() == null) || Objects.equal(it_1.getOperation().getSimpleName(), "value")));
this.generateAnnotations(it.getAnnotations(), childAppendable, true, config); this.generateModifier(it, childAppendable, config); childAppendable.append("@interface ");