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 theStandardTypeReferenceOwner
to 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 LightweightTypeReference
doVisitAnyTypeReference(org.eclipse.xtext.common.types.JvmAnyTypeReference reference)
protected LightweightTypeReference
doVisitCompoundReference(org.eclipse.xtext.common.types.JvmCompoundTypeReference reference, boolean synonym)
LightweightTypeReference
doVisitComputedTypeReference(XComputedTypeReference reference)
LightweightTypeReference
doVisitFunctionTypeReference(XFunctionTypeRef reference)
LightweightTypeReference
doVisitGenericArrayTypeReference(org.eclipse.xtext.common.types.JvmGenericArrayTypeReference reference)
LightweightTypeReference
doVisitInnerTypeReference(org.eclipse.xtext.common.types.JvmInnerTypeReference reference)
LightweightTypeReference
doVisitMultiTypeReference(org.eclipse.xtext.common.types.JvmMultiTypeReference reference)
LightweightTypeReference
doVisitParameterizedTypeReference(org.eclipse.xtext.common.types.JvmParameterizedTypeReference reference)
LightweightTypeReference
doVisitSynonymTypeReference(org.eclipse.xtext.common.types.JvmSynonymTypeReference reference)
LightweightTypeReference
doVisitTypeReference(org.eclipse.xtext.common.types.JvmTypeReference reference)
LightweightTypeReference
doVisitUnknownTypeReference(org.eclipse.xtext.common.types.JvmUnknownTypeReference reference)
LightweightTypeReference
doVisitWildcardTypeReference(org.eclipse.xtext.common.types.JvmWildcardTypeReference reference)
protected LightweightTypeReference
getObjectReference()
protected org.eclipse.xtext.common.types.JvmType
getObjectType()
ITypeReferenceOwner
getOwner()
protected org.eclipse.xtext.common.types.JvmType
getType(org.eclipse.xtext.common.types.JvmTypeReference reference)
protected LightweightTypeReference
handleNullReference()
protected boolean
isInner(org.eclipse.xtext.common.types.JvmType type)
LightweightTypeReference
toLightweightReference(org.eclipse.xtext.common.types.JvmType type)
LightweightTypeReference
toLightweightReference(org.eclipse.xtext.common.types.JvmTypeReference reference)
LightweightTypeReference
toPlainTypeReference(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
-true
if 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:
doVisitAnyTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitAnyTypeReference
in classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitGenericArrayTypeReference
public LightweightTypeReference doVisitGenericArrayTypeReference(org.eclipse.xtext.common.types.JvmGenericArrayTypeReference reference)
- Specified by:
doVisitGenericArrayTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitGenericArrayTypeReference
in classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitMultiTypeReference
public LightweightTypeReference doVisitMultiTypeReference(org.eclipse.xtext.common.types.JvmMultiTypeReference reference)
- Specified by:
doVisitMultiTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitMultiTypeReference
in 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:
doVisitComputedTypeReference
in interfaceXtypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitComputedTypeReference
in classAbstractXtypeReferenceVisitor<LightweightTypeReference>
-
doVisitParameterizedTypeReference
public LightweightTypeReference doVisitParameterizedTypeReference(org.eclipse.xtext.common.types.JvmParameterizedTypeReference reference)
- Specified by:
doVisitParameterizedTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitParameterizedTypeReference
in 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:
doVisitInnerTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitInnerTypeReference
in 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:
doVisitSynonymTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitSynonymTypeReference
in classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitWildcardTypeReference
public LightweightTypeReference doVisitWildcardTypeReference(org.eclipse.xtext.common.types.JvmWildcardTypeReference reference)
- Specified by:
doVisitWildcardTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitWildcardTypeReference
in classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
doVisitFunctionTypeReference
public LightweightTypeReference doVisitFunctionTypeReference(XFunctionTypeRef reference)
- Specified by:
doVisitFunctionTypeReference
in interfaceXtypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitFunctionTypeReference
in classAbstractXtypeReferenceVisitor<LightweightTypeReference>
-
doVisitUnknownTypeReference
public LightweightTypeReference doVisitUnknownTypeReference(org.eclipse.xtext.common.types.JvmUnknownTypeReference reference)
- Specified by:
doVisitUnknownTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitUnknownTypeReference
in classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
handleNullReference
protected LightweightTypeReference handleNullReference()
- Overrides:
handleNullReference
in 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:
doVisitTypeReference
in interfaceorg.eclipse.xtext.common.types.util.ITypeReferenceVisitor<LightweightTypeReference>
- Overrides:
doVisitTypeReference
in classorg.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.InheritanceAware<LightweightTypeReference>
-
-