protected void computeAnnotationTypes(ResolvedTypes resolvedTypes, IFeatureScopeSession sessions, JvmExecutable operation) { computeAnnotationTypes(resolvedTypes, sessions, (JvmAnnotationTarget) operation); for(JvmFormalParameter parameter: operation.getParameters()) { computeAnnotationTypes(resolvedTypes, sessions, parameter); } }
protected void computeAnnotationTypes(ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, JvmAnnotationTarget annotable) { List<JvmAnnotationReference> annotations = annotable.getAnnotations(); computeAnnotationTypes(resolvedTypes, featureScopeSession, annotations); }
@SuppressWarnings("unused") protected void _computeTypes(Map<JvmIdentifiableElement, ResolvedTypes> preparedResolvedTypes, ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, JvmDeclaredType type) { ResolvedTypes childResolvedTypes = preparedResolvedTypes.get(type); if (childResolvedTypes == null) throw new IllegalStateException("No resolved type found. Type was: " + type.getIdentifier()); IFeatureScopeSession capturedState = LocalVariableCapturerImpl.findCapturedState(type); if (capturedState != null) { featureScopeSession = capturedState; } IFeatureScopeSession childSession = addThisAndSuper(featureScopeSession, childResolvedTypes.getReferenceOwner(), type); computeMemberTypes(preparedResolvedTypes, childResolvedTypes, childSession, type); computeAnnotationTypes(childResolvedTypes, featureScopeSession, type); mergeChildTypes(childResolvedTypes); }
@SuppressWarnings("unused") protected void _computeTypes(Map<JvmIdentifiableElement, ResolvedTypes> preparedResolvedTypes, ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, JvmConstructor constructor) { ResolvedTypes childResolvedTypes = preparedResolvedTypes.get(constructor); if (childResolvedTypes == null) { if (preparedResolvedTypes.containsKey(constructor)) return; throw new IllegalStateException("No resolved type found. Constructor was: " + constructor.getIdentifier()); } else { preparedResolvedTypes.put(constructor, null); } ConstructorBodyComputationState state = new ConstructorBodyComputationState(childResolvedTypes, featureScopeSession.toInstanceContext().toConstructorContext(), constructor); addExtensionProviders(state, constructor.getParameters()); state.computeTypes(); computeAnnotationTypes(childResolvedTypes, featureScopeSession, constructor); computeLocalTypes(preparedResolvedTypes, childResolvedTypes, featureScopeSession, constructor); mergeChildTypes(childResolvedTypes); }
@SuppressWarnings("unused") protected void _computeTypes(Map<JvmIdentifiableElement, ResolvedTypes> preparedResolvedTypes, ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, JvmOperation operation) { ResolvedTypes childResolvedTypes = preparedResolvedTypes.get(operation); if (childResolvedTypes == null) { if (preparedResolvedTypes.containsKey(operation)) return; throw new IllegalStateException("No resolved type found. Operation was: " + operation.getIdentifier()); } else { preparedResolvedTypes.put(operation, null); } OperationBodyComputationState state = new OperationBodyComputationState(childResolvedTypes, operation.isStatic() ? featureScopeSession : featureScopeSession.toInstanceContext(), operation); addExtensionProviders(state, operation.getParameters()); markComputing(operation.getReturnType()); try { state.computeTypes(); } finally { unmarkComputing(operation.getReturnType()); } computeAnnotationTypes(childResolvedTypes, featureScopeSession, operation); computeLocalTypes(preparedResolvedTypes, childResolvedTypes, featureScopeSession, operation); mergeChildTypes(childResolvedTypes); }
protected void computeAnnotationTypes(ResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, List<JvmAnnotationReference> annotations) { for(JvmAnnotationReference annotation: annotations) { EObject sourceElement = getSourceElement(annotation); if (sourceElement != annotation) { computeTypes(resolvedTypes, featureScopeSession, sourceElement); } else { for(JvmAnnotationValue value: annotation.getExplicitValues()) { if (value instanceof JvmCustomAnnotationValue) { JvmCustomAnnotationValue custom = (JvmCustomAnnotationValue) value; for(Object object: custom.getValues()) { if (object instanceof XExpression) { AnnotationValueTypeComputationState state = new AnnotationValueTypeComputationState(resolvedTypes, featureScopeSession, value, (XExpression) object); state.computeTypes(); } } } else if (value instanceof JvmAnnotationAnnotationValue) { computeAnnotationTypes(resolvedTypes, featureScopeSession, ((JvmAnnotationAnnotationValue) value).getValues()); } } } } }
unmarkComputing(field.getType()); computeAnnotationTypes(childResolvedTypes, featureScopeSession, field); computeLocalTypes(preparedResolvedTypes, childResolvedTypes, featureScopeSession, field); if (field.isStatic() && field.isFinal() && !field.isSetConstant()) {