Class LightweightTypeReferenceFactory
- java.lang.Object
-
- org.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor<Result>
-
- org.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<Result>
-
- org.eclipse.xtext.xtype.util.AbstractXtypeReferenceVisitor<LightweightTypeReference>
-
- org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReferenceFactory
-
- All Implemented Interfaces:
org.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>,XtypeReferenceVisitor<LightweightTypeReference>
- Direct Known Subclasses:
IndexingLightweightTypeReferenceFactory,OwnedConverter
public class LightweightTypeReferenceFactory extends AbstractXtypeReferenceVisitor<LightweightTypeReference>
Concrete implementation that is used by theStandardTypeReferenceOwnerto provide instances ofLightweightTypeReference. Clients may use a custom implementation of this factory and configure it with aStandardTypeReferenceOwner.
-
-
Constructor Summary
Constructors Constructor Description LightweightTypeReferenceFactory(ITypeReferenceOwner owner).LightweightTypeReferenceFactory(ITypeReferenceOwner owner, boolean keepUnboundWildcards)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LightweightTypeReferencedoVisitAnyTypeReference(org.eclipse.xtext.common.types.JvmAnyTypeReference reference)protected LightweightTypeReferencedoVisitCompoundReference(org.eclipse.xtext.common.types.JvmCompoundTypeReference reference, boolean synonym)LightweightTypeReferencedoVisitComputedTypeReference(XComputedTypeReference reference)LightweightTypeReferencedoVisitFunctionTypeReference(XFunctionTypeRef reference)LightweightTypeReferencedoVisitGenericArrayTypeReference(org.eclipse.xtext.common.types.JvmGenericArrayTypeReference reference)LightweightTypeReferencedoVisitInnerTypeReference(org.eclipse.xtext.common.types.JvmInnerTypeReference reference)LightweightTypeReferencedoVisitMultiTypeReference(org.eclipse.xtext.common.types.JvmMultiTypeReference reference)LightweightTypeReferencedoVisitParameterizedTypeReference(org.eclipse.xtext.common.types.JvmParameterizedTypeReference reference)LightweightTypeReferencedoVisitSynonymTypeReference(org.eclipse.xtext.common.types.JvmSynonymTypeReference reference)LightweightTypeReferencedoVisitTypeReference(org.eclipse.xtext.common.types.JvmTypeReference reference)LightweightTypeReferencedoVisitUnknownTypeReference(org.eclipse.xtext.common.types.JvmUnknownTypeReference reference)LightweightTypeReferencedoVisitWildcardTypeReference(org.eclipse.xtext.common.types.JvmWildcardTypeReference reference)protected LightweightTypeReferencegetObjectReference()protected org.eclipse.xtext.common.types.JvmTypegetObjectType()ITypeReferenceOwnergetOwner()protected org.eclipse.xtext.common.types.JvmTypegetType(org.eclipse.xtext.common.types.JvmTypeReference reference)protected LightweightTypeReferencehandleNullReference()protected booleanisInner(org.eclipse.xtext.common.types.JvmType type)LightweightTypeReferencetoLightweightReference(org.eclipse.xtext.common.types.JvmType type)LightweightTypeReferencetoLightweightReference(org.eclipse.xtext.common.types.JvmTypeReference reference)LightweightTypeReferencetoPlainTypeReference(org.eclipse.xtext.common.types.JvmType type)-
Methods inherited from class org.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware
doVisitCompoundTypeReference
-
Methods inherited from class org.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor
doVisitDelegateTypeReference, doVisitSpecializedTypeReference, visit
-
-
-
-
Constructor Detail
-
LightweightTypeReferenceFactory
public LightweightTypeReferenceFactory(ITypeReferenceOwner owner)
. * Creates a new owned converter with proper substitution of unbound wildcards. Equivalent tonew OwnedConverter(owner, false).
-
LightweightTypeReferenceFactory
public LightweightTypeReferenceFactory(ITypeReferenceOwner owner, boolean keepUnboundWildcards)
- Parameters:
keepUnboundWildcards-trueif unbound wildcards should be converted to? extends Object. Unbound information is required to do proper cast validation. In other cases, the compiler should add the upper bound object.- See Also:
WildcardType.getUpperBounds()
-
-
Method Detail
-
getOwner
public ITypeReferenceOwner getOwner()
-
toLightweightReference
public LightweightTypeReference toLightweightReference(org.eclipse.xtext.common.types.JvmTypeReference reference)
-
toLightweightReference
public LightweightTypeReference toLightweightReference(org.eclipse.xtext.common.types.JvmType type)
-
toPlainTypeReference
public LightweightTypeReference toPlainTypeReference(org.eclipse.xtext.common.types.JvmType type)
-
doVisitAnyTypeReference
public LightweightTypeReference doVisitAnyTypeReference(org.eclipse.xtext.common.types.JvmAnyTypeReference reference)
- Specified by:
doVisitAnyTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitAnyTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitGenericArrayTypeReference
public LightweightTypeReference doVisitGenericArrayTypeReference(org.eclipse.xtext.common.types.JvmGenericArrayTypeReference reference)
- Specified by:
doVisitGenericArrayTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitGenericArrayTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitMultiTypeReference
public LightweightTypeReference doVisitMultiTypeReference(org.eclipse.xtext.common.types.JvmMultiTypeReference reference)
- Specified by:
doVisitMultiTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitMultiTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitCompoundReference
protected LightweightTypeReference doVisitCompoundReference(org.eclipse.xtext.common.types.JvmCompoundTypeReference reference, boolean synonym)
-
doVisitComputedTypeReference
public LightweightTypeReference doVisitComputedTypeReference(XComputedTypeReference reference)
- Specified by:
doVisitComputedTypeReferencein interfaceXtypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitComputedTypeReferencein classAbstractXtypeReferenceVisitor<LightweightTypeReference>
-
doVisitParameterizedTypeReference
public LightweightTypeReference doVisitParameterizedTypeReference(org.eclipse.xtext.common.types.JvmParameterizedTypeReference reference)
- Specified by:
doVisitParameterizedTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitParameterizedTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
isInner
protected boolean isInner(org.eclipse.xtext.common.types.JvmType type)
-
doVisitInnerTypeReference
public LightweightTypeReference doVisitInnerTypeReference(org.eclipse.xtext.common.types.JvmInnerTypeReference reference)
- Specified by:
doVisitInnerTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitInnerTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
getType
protected org.eclipse.xtext.common.types.JvmType getType(org.eclipse.xtext.common.types.JvmTypeReference reference)
-
doVisitSynonymTypeReference
public LightweightTypeReference doVisitSynonymTypeReference(org.eclipse.xtext.common.types.JvmSynonymTypeReference reference)
- Specified by:
doVisitSynonymTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitSynonymTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitWildcardTypeReference
public LightweightTypeReference doVisitWildcardTypeReference(org.eclipse.xtext.common.types.JvmWildcardTypeReference reference)
- Specified by:
doVisitWildcardTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitWildcardTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitFunctionTypeReference
public LightweightTypeReference doVisitFunctionTypeReference(XFunctionTypeRef reference)
- Specified by:
doVisitFunctionTypeReferencein interfaceXtypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitFunctionTypeReferencein classAbstractXtypeReferenceVisitor<LightweightTypeReference>
-
doVisitUnknownTypeReference
public LightweightTypeReference doVisitUnknownTypeReference(org.eclipse.xtext.common.types.JvmUnknownTypeReference reference)
- Specified by:
doVisitUnknownTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitUnknownTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
handleNullReference
protected LightweightTypeReference handleNullReference()
- Overrides:
handleNullReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor<LightweightTypeReference>
-
getObjectReference
protected LightweightTypeReference getObjectReference()
-
getObjectType
protected org.eclipse.xtext.common.types.JvmType getObjectType()
-
doVisitTypeReference
public LightweightTypeReference doVisitTypeReference(org.eclipse.xtext.common.types.JvmTypeReference reference)
- Specified by:
doVisitTypeReferencein interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>- Overrides:
doVisitTypeReferencein classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
-