@Override public JvmTypeReference doVisitCompoundTypeReference(JvmCompoundTypeReference reference, Resource resource) { JvmCompoundTypeReference result = null; List<JvmTypeReference> components = reference.getReferences(); int recent = -1; for (int i = 0; i < components.size(); i++) { JvmTypeReference component = components.get(i); JvmTypeReference rawType = visit(component, resource); if (rawType != null && component != rawType) { if (result == null) { result = (JvmCompoundTypeReference) EcoreUtil.create(reference.eClass()); } for (int j = recent + 1; j < i; j++) { result.getReferences().add(components.get(j)); } result.getReferences().add(rawType); recent = i; } } if (result != null) return result; return reference; }
@Override public JvmTypeReference doVisitCompoundTypeReference(JvmCompoundTypeReference reference, Resource resource) { JvmCompoundTypeReference result = null; List<JvmTypeReference> components = reference.getReferences(); int recent = -1; for(int i = 0; i < components.size(); i++) { JvmTypeReference component = components.get(i); JvmTypeReference rawType = visit(component, resource); if (rawType != null && component != rawType) { if (result == null) { result = (JvmCompoundTypeReference) EcoreUtil.create(reference.eClass()); } for(int j = recent + 1; j < i; j++) { result.getReferences().add(components.get(j)); } result.getReferences().add(rawType); recent = i; } } if (result != null) return result; return reference; }
for (JvmTypeConstraint constraint : constraints) { if (constraint instanceof JvmUpperBound) { JvmTypeReference rawType = visit(constraint.getTypeReference(), resource); if (result == null) { if (rawType != null && rawType.eContainer() != null) {
for(JvmTypeConstraint constraint: constraints) { if (constraint instanceof JvmUpperBound) { JvmTypeReference rawType = visit(constraint.getTypeReference(), resource); if (result == null) { if (rawType != null && rawType.eContainer() != null) {
public JvmTypeReference getRawTypeReference(JvmTypeReference reference, Resource resource) { JvmTypeReference result = visit(reference, resource); return result; }
@Override public JvmTypeReference doVisitGenericArrayTypeReference(JvmGenericArrayTypeReference reference, Resource resource) { JvmTypeReference componentType = reference.getComponentType(); JvmTypeReference rawComponentType = visit(componentType, resource); if (componentType != rawComponentType) { JvmGenericArrayTypeReference result = factory.createJvmGenericArrayTypeReference(); result.setComponentType(rawComponentType); return result; } return reference; }
@Override public JvmTypeReference doVisitGenericArrayTypeReference(JvmGenericArrayTypeReference reference, Resource resource) { JvmTypeReference componentType = reference.getComponentType(); JvmTypeReference rawComponentType = visit(componentType, resource); if (componentType != rawComponentType) { JvmGenericArrayTypeReference result = factory.createJvmGenericArrayTypeReference(); result.setComponentType(rawComponentType); return result; } return reference; }
public JvmTypeReference getRawTypeReference(JvmTypeReference reference, Resource resource) { JvmTypeReference result = visit(reference, resource); return result; }