public static boolean isDeprecatedAnnotation(JvmAnnotationType jvmAnnotationType) { return !jvmAnnotationType.eIsProxy() && Deprecated.class.getName().equals(jvmAnnotationType.getIdentifier()); }
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; } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmAnnotationType getAnnotation() { if (annotation != null && annotation.eIsProxy()) { InternalEObject oldAnnotation = (InternalEObject)annotation; annotation = (JvmAnnotationType)eResolveProxy(oldAnnotation); if (annotation != oldAnnotation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TypesPackage.JVM_ANNOTATION_REFERENCE__ANNOTATION, oldAnnotation, annotation)); } } return annotation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmAnnotationType getAnnotation() { if (annotation != null && annotation.eIsProxy()) { InternalEObject oldAnnotation = (InternalEObject)annotation; annotation = (JvmAnnotationType)eResolveProxy(oldAnnotation); if (annotation != oldAnnotation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TypesPackage.JVM_ANNOTATION_REFERENCE__ANNOTATION, oldAnnotation, annotation)); } } return annotation; }
public static boolean isDeprecated(JvmAnnotationTarget jvmAnnotationTarget) { for (JvmAnnotationReference ref : jvmAnnotationTarget.getAnnotations()) { if (ref != null && !ref.eIsProxy()) { JvmAnnotationType annotation = ref.getAnnotation(); if(annotation != null && !annotation.eIsProxy() && isDeprecated(annotation)) return true; } } return false; }
public void serializeSafely(final JvmAnnotationReference annotationRef, final ITreeAppendable appendable, final Procedure1<? super ITreeAppendable> onSuccess) { if (((annotationRef == null) || (annotationRef.getAnnotation() == null))) { final ITreeAppendable errorChild = this.openErrorAppendable(appendable, appendable); errorChild.append("annotation is \'null\'"); this.closeErrorAppendable(appendable, errorChild); } else { boolean _eIsProxy = annotationRef.getAnnotation().eIsProxy(); if (_eIsProxy) { final ITreeAppendable errorChild_1 = this.openErrorAppendable(appendable, appendable); appendable.append("@"); appendable.append(annotationRef.getAnnotation()); this.closeErrorAppendable(appendable, errorChild_1); } else { appendable.append("@"); appendable.append(annotationRef.getAnnotation()); onSuccess.apply(appendable); } } } }