@Override public List<JvmType> doVisitCompoundTypeReference(JvmCompoundTypeReference reference, Resource resource) { List<JvmTypeReference> references = reference.getReferences(); if (references.isEmpty()) return Collections.emptyList(); List<JvmType> result = Lists.newArrayList(); for (JvmTypeReference contained : references) { result.addAll(visit(contained, resource)); } return result; }
@Override public List<JvmType> doVisitCompoundTypeReference(JvmCompoundTypeReference reference, Resource resource) { List<JvmTypeReference> references = reference.getReferences(); if (references.isEmpty()) return Collections.emptyList(); List<JvmType> result = Lists.newArrayList(); for(JvmTypeReference contained: references) { result.addAll(visit(contained, resource)); } return result; }
protected List<JvmType> getRawTypesFromConstraints(List<JvmTypeConstraint> constraints, Resource resource) { if (!constraints.isEmpty()) { List<JvmType> result = Lists.newArrayList(); for (JvmTypeConstraint constraint : constraints) { if (constraint instanceof JvmUpperBound) { result.addAll(visit(constraint.getTypeReference(), resource)); } } if (!result.isEmpty()) return result; } return createObjectReference(resource); }
protected List<JvmType> getRawTypesFromConstraints(List<JvmTypeConstraint> constraints, Resource resource) { if (!constraints.isEmpty()) { List<JvmType> result = Lists.newArrayList(); for(JvmTypeConstraint constraint: constraints) { if (constraint instanceof JvmUpperBound) { result.addAll(visit(constraint.getTypeReference(), resource)); } } if (!result.isEmpty()) return result; } return createObjectReference(resource); }
@Override public List<JvmType> doVisitGenericArrayTypeReference(JvmGenericArrayTypeReference reference, Resource resource) { JvmTypeReference componentType = reference.getComponentType(); List<JvmType> rawComponentTypes = visit(componentType, resource); List<JvmType> result = Lists.newArrayListWithCapacity(rawComponentTypes.size()); for (JvmType rawComponentType : rawComponentTypes) { if (!rawComponentType.eIsProxy() && rawComponentType instanceof JvmComponentType) { JvmArrayType arrayType = ((JvmComponentType) rawComponentType).getArrayType(); result.add(arrayType); } } return result; }
public List<JvmType> getAllRawTypes(JvmTypeReference reference, Resource resource) { List<JvmType> result = visit(reference, resource); return result; }
public List<JvmType> getAllRawTypes(JvmTypeReference reference, Resource resource) { List<JvmType> result = visit(reference, resource); return result; }
@Override public List<JvmType> doVisitGenericArrayTypeReference(JvmGenericArrayTypeReference reference, Resource resource) { JvmTypeReference componentType = reference.getComponentType(); List<JvmType> rawComponentTypes = visit(componentType, resource); List<JvmType> result = Lists.newArrayListWithCapacity(rawComponentTypes.size()); for(JvmType rawComponentType: rawComponentTypes) { if (!rawComponentType.eIsProxy() && rawComponentType instanceof JvmComponentType) { JvmArrayType arrayType = ((JvmComponentType) rawComponentType).getArrayType(); result.add(arrayType); } } return result; }