protected JvmAnnotationType createAnnotationProxy(Class<? extends Annotation> type) { JvmAnnotationType proxy = annotationProxies.get(type); if (proxy == null) { proxy = TypesFactory.eINSTANCE.createJvmAnnotationType(); URI uri = uriHelper.getFullURI(type); ((InternalEObject)proxy).eSetProxyURI(uri); annotationProxies.put(type, proxy); } return proxy; }
protected JvmAnnotationType createAnnotationProxy(Class<? extends Annotation> type) { JvmAnnotationType proxy = annotationProxies.get(type); if (proxy == null) { proxy = TypesFactory.eINSTANCE.createJvmAnnotationType(); URI uri = uriHelper.getFullURI(type); ((InternalEObject)proxy).eSetProxyURI(uri); annotationProxies.put(type, proxy); } return proxy; }
@Override public void registerAnnotationType(final String qualifiedName) throws IllegalArgumentException { final JvmAnnotationType newType = TypesFactory.eINSTANCE.createJvmAnnotationType(); newType.setVisibility(JvmVisibility.PUBLIC); this.setNameAndAccept(newType, qualifiedName); }
public JvmAnnotationType createAnnotationProxy(BinaryTypeSignature type) { JvmType proxy = typeProxies.get(type); if (proxy == null) { JvmAnnotationType result = TypesFactory.eINSTANCE.createJvmAnnotationType(); URI uri = type.getURI(); ((InternalEObject) result).eSetProxyURI(uri); typeProxies.put(type, result); return result; } else if (proxy.eClass() != TypesPackage.Literals.JVM_ANNOTATION_TYPE) { JvmAnnotationType result = TypesFactory.eINSTANCE.createJvmAnnotationType(); ((InternalEObject) result).eSetProxyURI(((InternalEObject) proxy).eProxyURI()); typeProxies.put(type, result); return result; } return (JvmAnnotationType) proxy; }
protected JvmAnnotationType createAnnotationType(Class<?> clazz) { JvmAnnotationType result = TypesFactory.eINSTANCE.createJvmAnnotationType(); result.internalSetIdentifier(clazz.getName()); result.setSimpleName(clazz.getSimpleName()); if (clazz.getDeclaringClass() == null && clazz.getPackage() != null) result.setPackageName(clazz.getPackage().getName()); setVisibility(clazz, result); setTypeModifiers(clazz, result); createNestedTypes(clazz, result); createMethods(clazz, result); setSuperTypes(clazz, result); createAnnotationValues(clazz, result); return result; }
protected JvmAnnotationType createAnnotationType(Class<?> clazz) { JvmAnnotationType result = TypesFactory.eINSTANCE.createJvmAnnotationType(); result.internalSetIdentifier(clazz.getName()); result.setSimpleName(clazz.getSimpleName()); if (clazz.getDeclaringClass() == null && clazz.getPackage() != null) result.setPackageName(clazz.getPackage().getName()); setVisibility(clazz, result); setTypeModifiers(clazz, result); createNestedTypes(clazz, result); createMethods(clazz, result); createFields(clazz, result); setSuperTypes(clazz, result); createAnnotationValues(clazz, result); return result; }
final JvmAnnotationType annotation = typesFactory.createJvmAnnotationType(); if (!preIndexingPhase) { doLater.add(new Runnable() {
break; case TypeDeclaration.ANNOTATION_TYPE_DECL: _switchResult = TypesFactory.eINSTANCE.createJvmAnnotationType(); break; default:
offset = 2; } else if ((ACC_ANNOTATION & access) != 0) { result = TypesFactory.eINSTANCE.createJvmAnnotationType(); } else { JvmGenericType generic = TypesFactory.eINSTANCE.createJvmGenericType();
/** * Creates a public annotation declaration, associated to the given sourceElement. It sets the given name, which might be * fully qualified using the standard Java notation. * * @param sourceElement * the sourceElement the resulting element is associated with. * @param name * the qualified name of the resulting class. * @param initializer * the initializer to apply on the created annotation. If <code>null</code>, the annotation won't be initialized. * * @return a {@link JvmAnnotationType} representing a Java annotation of the given name, <code>null</code> * if sourceElement or name are <code>null</code>. */ /* @Nullable */ public JvmAnnotationType toAnnotationType(/* @Nullable */ EObject sourceElement, /* @Nullable */ String name, /* @Nullable */ Procedure1<? super JvmAnnotationType> initializer) { if (sourceElement == null || name == null) return null; Pair<String, String> fullName = splitQualifiedName(name); JvmAnnotationType annotationType = typesFactory.createJvmAnnotationType(); annotationType.setSimpleName(fullName.getSecond()); annotationType.setAbstract(true); if (fullName.getFirst() != null) annotationType.setPackageName(fullName.getFirst()); associate(sourceElement, annotationType); return initializeSafely(annotationType, initializer); }
XAnnotationsPackage.Literals.XANNOTATION__ANNOTATION_TYPE, false); if (annotation.eIsProxy()) { JvmAnnotationType copiedProxy = TypesFactory.eINSTANCE.createJvmAnnotationType(); ((InternalEObject)copiedProxy).eSetProxyURI(EcoreUtil.getURI(annotation)); reference.setAnnotation(copiedProxy);