Class InnerFunctionTypeReference
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
-
- org.eclipse.xtext.xbase.typesystem.references.ParameterizedTypeReference
-
- org.eclipse.xtext.xbase.typesystem.references.FunctionTypeReference
-
- org.eclipse.xtext.xbase.typesystem.references.InnerFunctionTypeReference
-
public class InnerFunctionTypeReference extends FunctionTypeReference
-
-
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 InnerFunctionTypeReference(ITypeReferenceOwner owner, LightweightTypeReference outer, org.eclipse.xtext.common.types.JvmType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(TypeReferenceVisitor visitor)
<Param> void
accept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)
<Param,Result>
Resultaccept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)
<Result> Result
accept(TypeReferenceVisitorWithResult<Result> visitor)
protected void
checkStaticFlag(org.eclipse.xtext.common.types.JvmDeclaredType type)
protected InnerFunctionTypeReference
doCopyInto(ITypeReferenceOwner owner)
protected java.lang.String
getAsString(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
protected java.lang.String
getAsStringNoFunctionType(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
org.eclipse.xtext.common.types.JvmTypeReference
getEquivalentTypeReference()
int
getKind()
Subclasses must override this method.LightweightTypeReference
getOuter()
LightweightTypeReference
getRawTypeReference()
boolean
hasTypeArguments()
boolean
isOwnedBy(ITypeReferenceOwner owner)
boolean
isRawType()
Returnstrue
is this type points to a raw type.boolean
isResolved()
boolean
isVisible(IVisibilityHelper visibilityHelper)
Returnstrue
if this type is fully visible according to the givenvisibilityHelper
.ParameterizedTypeReference
toInstanceTypeReference()
Returns a projection of this type to the instance level.org.eclipse.xtext.common.types.JvmTypeReference
toJavaCompliantTypeReference(IVisibilityHelper visibilityHelper)
Converts this type reference to aJvmTypeReference
that can be used in Java source code.-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.references.FunctionTypeReference
addParameterType, copyTypeArguments, getAsFunctionTypeReference, getJavaIdentifier, getParameterTypes, getReturnType, setReturnType, toTypeReference, tryConvertToFunctionTypeReference
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.references.ParameterizedTypeReference
addTypeArgument, createRawTypeReference, getConstraintSubstitute, getFunctionTypeKind, getIdentifier, getPrimitiveIfWrapperType, getPrimitiveKind, getPrimitiveKindIfWrapperType, getRawSuperType, getRawTypes, getSimpleName, getSuperType, getSuperType, getSuperTypes, getType, getTypeArguments, getUniqueIdentifier, getWrapperTypeIfPrimitive, isAnonymous, isInner, isInterfaceType, isPrimitive, isPrimitiveVoid, isType, isTypeVisible, isWrapper, tryConvertToArray, 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
-
InnerFunctionTypeReference
public InnerFunctionTypeReference(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:
checkStaticFlag
in classParameterizedTypeReference
-
getKind
public int getKind()
Description copied from class:FunctionTypeReference
Subclasses must override this method.- Overrides:
getKind
in classFunctionTypeReference
-
getOuter
public LightweightTypeReference getOuter()
- Overrides:
getOuter
in classLightweightTypeReference
-
hasTypeArguments
public boolean hasTypeArguments()
- Overrides:
hasTypeArguments
in classLightweightTypeReference
-
isResolved
public boolean isResolved()
- Overrides:
isResolved
in classParameterizedTypeReference
-
getRawTypeReference
public LightweightTypeReference getRawTypeReference()
- Overrides:
getRawTypeReference
in classParameterizedTypeReference
- Returns:
- the erasure type of this type reference
-
getEquivalentTypeReference
public org.eclipse.xtext.common.types.JvmTypeReference getEquivalentTypeReference()
- Overrides:
getEquivalentTypeReference
in classFunctionTypeReference
-
toJavaCompliantTypeReference
public org.eclipse.xtext.common.types.JvmTypeReference toJavaCompliantTypeReference(IVisibilityHelper visibilityHelper)
Description copied from class:LightweightTypeReference
Converts this type reference to aJvmTypeReference
that can be used in Java source code.- Overrides:
toJavaCompliantTypeReference
in classParameterizedTypeReference
-
isRawType
public boolean isRawType()
Description copied from class:LightweightTypeReference
Returnstrue
is 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:
isRawType
in classParameterizedTypeReference
-
isOwnedBy
public boolean isOwnedBy(ITypeReferenceOwner owner)
- Overrides:
isOwnedBy
in classFunctionTypeReference
-
isVisible
public boolean isVisible(IVisibilityHelper visibilityHelper)
Description copied from class:LightweightTypeReference
Returnstrue
if this type is fully visible according to the givenvisibilityHelper
. All components and bounds are taken into account, e.g.arrays
use theircomponent type
andgenerified types
check their type arguments, too.- Overrides:
isVisible
in classFunctionTypeReference
-
doCopyInto
protected InnerFunctionTypeReference doCopyInto(ITypeReferenceOwner owner)
- Overrides:
doCopyInto
in classFunctionTypeReference
-
getAsString
protected java.lang.String getAsString(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
- Overrides:
getAsString
in classFunctionTypeReference
-
getAsStringNoFunctionType
protected java.lang.String getAsStringNoFunctionType(java.lang.String type, com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
- Overrides:
getAsStringNoFunctionType
in classFunctionTypeReference
-
accept
public void accept(TypeReferenceVisitor visitor)
- Overrides:
accept
in classFunctionTypeReference
-
accept
public <Param> void accept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)
- Overrides:
accept
in classFunctionTypeReference
-
accept
public <Result> Result accept(TypeReferenceVisitorWithResult<Result> visitor)
- Overrides:
accept
in classFunctionTypeReference
-
accept
public <Param,Result> Result accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)
- Overrides:
accept
in classFunctionTypeReference
-
toInstanceTypeReference
public ParameterizedTypeReference toInstanceTypeReference()
Description copied from class:ParameterizedTypeReference
Returns 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:
toInstanceTypeReference
in classParameterizedTypeReference
-
-