Class InnerTypeReference
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
-
- org.eclipse.xtext.xbase.typesystem.references.ParameterizedTypeReference
-
- org.eclipse.xtext.xbase.typesystem.references.InnerTypeReference
-
public class InnerTypeReference extends ParameterizedTypeReference
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
LightweightTypeReference.IdentifierFunction, LightweightTypeReference.JavaIdentifierFunction, LightweightTypeReference.SimpleNameFunction, LightweightTypeReference.UniqueIdentifierFunction
-
-
Field Summary
-
Fields inherited from class org.eclipse.xtext.xbase.typesystem.references.ParameterizedTypeReference
resolved
-
Fields inherited from class org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
KIND_ANY_TYPE_REFERENCE, KIND_ARRAY_TYPE_REFERENCE, KIND_COMPOUND_TYPE_REFERENCE, KIND_FUNCTION_TYPE_REFERENCE, KIND_INNER_FUNCTION_TYPE_REFERENCE, KIND_INNER_TYPE_REFERENCE, KIND_LIGHTWEIGHT_TYPE_REFERENCE, KIND_PARAMETERIZED_TYPE_REFERENCE, KIND_UNBOUND_TYPE_REFERENCE, KIND_UNKNOWN_TYPE_REFERENCE, KIND_WILDCARD_TYPE_REFERENCE
-
-
Constructor Summary
Constructors Constructor Description InnerTypeReference(ITypeReferenceOwner owner, LightweightTypeReference outer, org.eclipse.xtext.common.types.JvmType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TypeReferenceVisitor visitor)<Param> voidaccept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)<Param,Result>
Resultaccept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)<Result> Resultaccept(TypeReferenceVisitorWithResult<Result> visitor)protected voidcheckStaticFlag(org.eclipse.xtext.common.types.JvmDeclaredType type)protected ParameterizedTypeReferencedoCopyInto(ITypeReferenceOwner owner)protected java.lang.StringgetAsString(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)intgetKind()Subclasses must override this method.LightweightTypeReferencegetOuter()LightweightTypeReferencegetRawTypeReference()booleanhasTypeArguments()booleanisOwnedBy(ITypeReferenceOwner owner)booleanisRawType()Returnstrueis this type points to a raw type.booleanisResolved()booleanisVisible(IVisibilityHelper visibilityHelper)Returnstrueif this type is fully visible according to the givenvisibilityHelper.ParameterizedTypeReferencetoInstanceTypeReference()Returns a projection of this type to the instance level.org.eclipse.xtext.common.types.JvmTypeReferencetoJavaCompliantTypeReference(IVisibilityHelper visibilityHelper)Converts this type reference to aJvmTypeReferencethat can be used in Java source code.org.eclipse.xtext.common.types.JvmTypeReferencetoTypeReference()-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.references.ParameterizedTypeReference
addTypeArgument, copyTypeArguments, createRawTypeReference, getAsFunctionTypeReference, getConstraintSubstitute, getFunctionTypeKind, getIdentifier, getJavaIdentifier, getPrimitiveIfWrapperType, getPrimitiveKind, getPrimitiveKindIfWrapperType, getRawSuperType, getRawTypes, getSimpleName, getSuperType, getSuperType, getSuperTypes, getType, getTypeArguments, getUniqueIdentifier, getWrapperTypeIfPrimitive, isAnonymous, isInner, isInterfaceType, isPrimitive, isPrimitiveVoid, isType, isTypeVisible, isWrapper, tryConvertToArray, tryConvertToFunctionTypeReference, tryConvertToListType
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
collectSuperTypes, collectSuperTypes, copyInto, createSubstitutor, expose, findNonNullType, findType, getAllSuperTypes, getComponentType, getHumanReadableName, getInvariantBoundSubstitute, getLowerBoundSubstitute, getMultiTypeComponents, getNamedType, getNonInterfaceTypes, getOwner, getServices, getSuperTypes, getTypesFactory, getUniqueIdentifier, getUpperBoundSubstitute, internalFindTopLevelType, internalIsAssignableFrom, isAny, isArray, isAssignableFrom, isAssignableFrom, isAssignableFrom, isAssignableFrom, isFunctionType, isMultiType, isSubtypeOf, isSubtypeOf, isSynonym, isUnknown, isValidHint, isWildcard, toJavaCompliantTypeReference, toJavaCompliantTypeReference, toJavaType, toString
-
-
-
-
Constructor Detail
-
InnerTypeReference
public InnerTypeReference(ITypeReferenceOwner owner, LightweightTypeReference outer, org.eclipse.xtext.common.types.JvmType type)
-
-
Method Detail
-
checkStaticFlag
protected void checkStaticFlag(org.eclipse.xtext.common.types.JvmDeclaredType type)
- Overrides:
checkStaticFlagin classParameterizedTypeReference
-
getKind
public int getKind()
Description copied from class:ParameterizedTypeReferenceSubclasses must override this method.- Overrides:
getKindin classParameterizedTypeReference
-
getOuter
public LightweightTypeReference getOuter()
- Overrides:
getOuterin classLightweightTypeReference
-
hasTypeArguments
public boolean hasTypeArguments()
- Overrides:
hasTypeArgumentsin classLightweightTypeReference
-
isResolved
public boolean isResolved()
- Overrides:
isResolvedin classParameterizedTypeReference
-
getRawTypeReference
public LightweightTypeReference getRawTypeReference()
- Overrides:
getRawTypeReferencein classParameterizedTypeReference- Returns:
- the erasure type of this type reference
-
toTypeReference
public org.eclipse.xtext.common.types.JvmTypeReference toTypeReference()
- Overrides:
toTypeReferencein classParameterizedTypeReference
-
toJavaCompliantTypeReference
public org.eclipse.xtext.common.types.JvmTypeReference toJavaCompliantTypeReference(IVisibilityHelper visibilityHelper)
Description copied from class:LightweightTypeReferenceConverts this type reference to aJvmTypeReferencethat can be used in Java source code.- Overrides:
toJavaCompliantTypeReferencein classParameterizedTypeReference
-
isRawType
public boolean isRawType()
Description copied from class:LightweightTypeReferenceReturnstrueis this type points to a raw type. That is, it points to a parameterized type but does not define type arguments or it points to an external type parameter that has a raw type constraint. Type parameters that are declared by the current owner are not considered to be raw types. A type is also a raw type if it inherits from a raw type.- Overrides:
isRawTypein classParameterizedTypeReference
-
isOwnedBy
public boolean isOwnedBy(ITypeReferenceOwner owner)
- Overrides:
isOwnedByin classParameterizedTypeReference
-
isVisible
public boolean isVisible(IVisibilityHelper visibilityHelper)
Description copied from class:LightweightTypeReferenceReturnstrueif this type is fully visible according to the givenvisibilityHelper. All components and bounds are taken into account, e.g.arraysuse theircomponent typeandgenerified typescheck their type arguments, too.- Overrides:
isVisiblein classParameterizedTypeReference
-
doCopyInto
protected ParameterizedTypeReference doCopyInto(ITypeReferenceOwner owner)
- Overrides:
doCopyIntoin classParameterizedTypeReference
-
getAsString
protected java.lang.String getAsString(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)- Overrides:
getAsStringin classParameterizedTypeReference
-
accept
public void accept(TypeReferenceVisitor visitor)
- Overrides:
acceptin classParameterizedTypeReference
-
accept
public <Param> void accept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)
- Overrides:
acceptin classParameterizedTypeReference
-
accept
public <Result> Result accept(TypeReferenceVisitorWithResult<Result> visitor)
- Overrides:
acceptin classParameterizedTypeReference
-
accept
public <Param,Result> Result accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)
- Overrides:
acceptin classParameterizedTypeReference
-
toInstanceTypeReference
public ParameterizedTypeReference toInstanceTypeReference()
Description copied from class:ParameterizedTypeReferenceReturns a projection of this type to the instance level. That is, type arguments will be replaced by their invariant bounds. The instance projection ofArrayList<? extends Iterable<? extends String>>isArrayList<Iterable<? extends String>>since it is possible to create instances ofArrayList<Iterable<? extends String>>.- Overrides:
toInstanceTypeReferencein classParameterizedTypeReference
-
-