Class UnknownTypeReference
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
-
- org.eclipse.xtext.xbase.typesystem.references.UnknownTypeReference
-
public class UnknownTypeReference extends LightweightTypeReference
Represents a JvmType that could not be resolved, e.g. a proxy or null. Generally speaking, unknown type references define features on demand, thus they do not produce conformance problems or follow up linking errors.
-
-
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.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 UnknownTypeReference(ITypeReferenceOwner owner)UnknownTypeReference(ITypeReferenceOwner owner, java.lang.String name)
-
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)voidcollectSuperTypes(SuperTypeAcceptor acceptor)protected LightweightTypeReferencedoCopyInto(ITypeReferenceOwner owner)java.lang.StringgetIdentifier()Returns the identifier of this type reference.java.lang.StringgetJavaIdentifier()intgetKind()Subclasses must override this method.java.lang.StringgetSimpleName()Prints the simple name of this type reference.protected java.util.List<LightweightTypeReference>getSuperTypes(TypeParameterSubstitutor<?> substitutor)org.eclipse.xtext.common.types.JvmTypegetType()java.lang.StringgetUniqueIdentifier()Returns an identifier that allows to disambiguate type parameter names that have different origins.booleanisType(java.lang.Class<?> clazz)Returns true if this type reference represents an type with the given raw typeclazz.booleanisUnknown()booleanisVisible(IVisibilityHelper visibilityHelper)Returnstrueif this type is fully visible according to the givenvisibilityHelper.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.LightweightTypeReference
collectSuperTypes, copyInto, createSubstitutor, expose, findNonNullType, findType, getAllSuperTypes, getAsFunctionTypeReference, getComponentType, getConstraintSubstitute, getFunctionTypeKind, getHumanReadableName, getInvariantBoundSubstitute, getLowerBoundSubstitute, getMultiTypeComponents, getNamedType, getNonInterfaceTypes, getOuter, getOwner, getPrimitiveIfWrapperType, getPrimitiveKind, getPrimitiveKindIfWrapperType, getRawTypeReference, getRawTypes, getServices, getSuperType, getSuperType, getSuperTypes, getTypeArguments, getTypesFactory, getUniqueIdentifier, getUpperBoundSubstitute, getWrapperTypeIfPrimitive, hasTypeArguments, internalFindTopLevelType, internalIsAssignableFrom, isAnonymous, isAny, isArray, isAssignableFrom, isAssignableFrom, isAssignableFrom, isAssignableFrom, isFunctionType, isInterfaceType, isMultiType, isOwnedBy, isPrimitive, isPrimitiveVoid, isRawType, isResolved, isSubtypeOf, isSubtypeOf, isSynonym, isValidHint, isWildcard, isWrapper, toJavaCompliantTypeReference, toJavaCompliantTypeReference, toJavaType, toString, tryConvertToArray, tryConvertToFunctionTypeReference, tryConvertToListType
-
-
-
-
Constructor Detail
-
UnknownTypeReference
public UnknownTypeReference(ITypeReferenceOwner owner, java.lang.String name)
-
UnknownTypeReference
public UnknownTypeReference(ITypeReferenceOwner owner)
-
-
Method Detail
-
getKind
public int getKind()
Subclasses must override this method.- Overrides:
getKindin classLightweightTypeReference
-
isUnknown
public boolean isUnknown()
- Overrides:
isUnknownin classLightweightTypeReference
-
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.- Specified by:
isVisiblein classLightweightTypeReference
-
toTypeReference
public org.eclipse.xtext.common.types.JvmTypeReference toTypeReference()
- Specified by:
toTypeReferencein classLightweightTypeReference
-
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.- Specified by:
toJavaCompliantTypeReferencein classLightweightTypeReference
-
getType
public org.eclipse.xtext.common.types.JvmType getType()
- Specified by:
getTypein classLightweightTypeReference
-
getSuperTypes
protected java.util.List<LightweightTypeReference> getSuperTypes(TypeParameterSubstitutor<?> substitutor)
- Specified by:
getSuperTypesin classLightweightTypeReference
-
doCopyInto
protected LightweightTypeReference doCopyInto(ITypeReferenceOwner owner)
- Specified by:
doCopyIntoin classLightweightTypeReference
-
getSimpleName
public java.lang.String getSimpleName()
Description copied from class:LightweightTypeReferencePrints the simple name of this type reference. Useful for testing.- Specified by:
getSimpleNamein classLightweightTypeReference
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from class:LightweightTypeReferenceReturns the identifier of this type reference. Usually the qualified name with a dollar delimiter.- Specified by:
getIdentifierin classLightweightTypeReference
-
getUniqueIdentifier
public java.lang.String getUniqueIdentifier()
Description copied from class:LightweightTypeReferenceReturns an identifier that allows to disambiguate type parameter names that have different origins. Rather than just giving the name of the type parameter, it also prints the declarator.- Specified by:
getUniqueIdentifierin classLightweightTypeReference
-
getJavaIdentifier
public java.lang.String getJavaIdentifier()
- Specified by:
getJavaIdentifierin classLightweightTypeReference
-
isType
public boolean isType(java.lang.Class<?> clazz)
Description copied from class:LightweightTypeReferenceReturns true if this type reference represents an type with the given raw typeclazz. Returns false if this is not exactly the given type, but a sub type, a super type or a completely unrelated type.- Specified by:
isTypein classLightweightTypeReference
-
collectSuperTypes
public void collectSuperTypes(SuperTypeAcceptor acceptor)
- Overrides:
collectSuperTypesin classLightweightTypeReference
-
accept
public void accept(TypeReferenceVisitor visitor)
- Overrides:
acceptin classLightweightTypeReference
-
accept
public <Param> void accept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)
- Overrides:
acceptin classLightweightTypeReference
-
accept
public <Result> Result accept(TypeReferenceVisitorWithResult<Result> visitor)
- Overrides:
acceptin classLightweightTypeReference
-
accept
public <Param,Result> Result accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)
- Overrides:
acceptin classLightweightTypeReference
-
-