Class ElementOrComponentTypeComputer
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.references.TypeReferenceVisitorWithResult<LightweightTypeReference>
-
- org.eclipse.xtext.xbase.typesystem.computation.ElementOrComponentTypeComputer
-
public class ElementOrComponentTypeComputer extends TypeReferenceVisitorWithResult<LightweightTypeReference>
A small utility that allows to query an arbitrary type reference for the value that is bound to the type parameterTofjava.lang.Iterable<T>. If the queried type is an array, the component type of the array is returned. Clients will usually use the static methodcompute(LightweightTypeReference, ITypeReferenceOwner)but are free to override this class and call the constructor directly and pass it as a visitor to the processed type reference.- Since:
- 2.8
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedElementOrComponentTypeComputer(ITypeReferenceOwner owner)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LightweightTypeReferencecompute(LightweightTypeReference iterableOrArray, ITypeReferenceOwner owner)protected LightweightTypeReferencedoVisitAnyTypeReference(AnyTypeReference reference)LightweightTypeReferencedoVisitArrayTypeReference(ArrayTypeReference reference)protected LightweightTypeReferencedoVisitCompoundTypeReference(CompoundTypeReference reference)LightweightTypeReferencedoVisitParameterizedTypeReference(ParameterizedTypeReference reference)protected LightweightTypeReferencedoVisitUnboundTypeReference(UnboundTypeReference reference)protected LightweightTypeReferencedoVisitUnknownTypeReference(UnknownTypeReference reference)protected ITypeReferenceOwnergetOwner()-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.references.TypeReferenceVisitorWithResult
doVisitFunctionTypeReference, doVisitInnerFunctionTypeReference, doVisitInnerTypeReference, doVisitMultiTypeReference, doVisitSynonymTypeReference, doVisitTypeReference, doVisitWildcardTypeReference
-
-
-
-
Constructor Detail
-
ElementOrComponentTypeComputer
protected ElementOrComponentTypeComputer(ITypeReferenceOwner owner)
-
-
Method Detail
-
compute
public static LightweightTypeReference compute(LightweightTypeReference iterableOrArray, ITypeReferenceOwner owner)
-
doVisitParameterizedTypeReference
public LightweightTypeReference doVisitParameterizedTypeReference(ParameterizedTypeReference reference)
- Overrides:
doVisitParameterizedTypeReferencein classTypeReferenceVisitorWithResult<LightweightTypeReference>
-
doVisitAnyTypeReference
protected LightweightTypeReference doVisitAnyTypeReference(AnyTypeReference reference)
- Overrides:
doVisitAnyTypeReferencein classTypeReferenceVisitorWithResult<LightweightTypeReference>
-
doVisitUnknownTypeReference
protected LightweightTypeReference doVisitUnknownTypeReference(UnknownTypeReference reference)
- Overrides:
doVisitUnknownTypeReferencein classTypeReferenceVisitorWithResult<LightweightTypeReference>
-
doVisitArrayTypeReference
public LightweightTypeReference doVisitArrayTypeReference(ArrayTypeReference reference)
- Overrides:
doVisitArrayTypeReferencein classTypeReferenceVisitorWithResult<LightweightTypeReference>
-
doVisitUnboundTypeReference
protected LightweightTypeReference doVisitUnboundTypeReference(UnboundTypeReference reference)
- Overrides:
doVisitUnboundTypeReferencein classTypeReferenceVisitorWithResult<LightweightTypeReference>
-
doVisitCompoundTypeReference
protected LightweightTypeReference doVisitCompoundTypeReference(CompoundTypeReference reference)
- Overrides:
doVisitCompoundTypeReferencein classTypeReferenceVisitorWithResult<LightweightTypeReference>
-
getOwner
protected ITypeReferenceOwner getOwner()
-
-