public class FunctionTypeReference extends ParameterizedTypeReference
LightweightTypeReference.IdentifierFunction, LightweightTypeReference.JavaIdentifierFunction, LightweightTypeReference.SimpleNameFunction, LightweightTypeReference.UniqueIdentifierFunctionresolvedKIND_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 and Description |
|---|
FunctionTypeReference(ITypeReferenceOwner owner,
org.eclipse.xtext.common.types.JvmType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(TypeReferenceVisitor visitor) |
<Param> void |
accept(TypeReferenceVisitorWithParameter<Param> visitor,
Param param) |
<Param,Result> |
accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor,
Param param) |
<Result> Result |
accept(TypeReferenceVisitorWithResult<Result> visitor) |
void |
addParameterType(LightweightTypeReference parameterType) |
protected void |
copyTypeArguments(ParameterizedTypeReference result,
ITypeReferenceOwner owner) |
protected FunctionTypeReference |
doCopyInto(ITypeReferenceOwner owner) |
FunctionTypeReference |
getAsFunctionTypeReference()
Returns the equivalent
FunctionTypeReference if this reference
points to a function or procedure
or if it is already a function type reference. |
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) |
protected org.eclipse.xtext.common.types.JvmTypeReference |
getEquivalentTypeReference() |
java.lang.String |
getJavaIdentifier() |
int |
getKind()
Subclasses must override this method.
|
java.util.List<LightweightTypeReference> |
getParameterTypes() |
LightweightTypeReference |
getReturnType() |
boolean |
isOwnedBy(ITypeReferenceOwner owner) |
boolean |
isVisible(IVisibilityHelper visibilityHelper)
Returns
true if this type is fully visible according to the given visibilityHelper. |
void |
setReturnType(LightweightTypeReference returnType) |
org.eclipse.xtext.common.types.JvmTypeReference |
toTypeReference() |
FunctionTypeReference |
tryConvertToFunctionTypeReference(boolean rawType)
Converts this reference to a
FunctionTypeReference if the referenced type is a SAM type. |
addTypeArgument, checkStaticFlag, createRawTypeReference, getFunctionTypeKind, getIdentifier, getPrimitiveIfWrapperType, getPrimitiveKind, getPrimitiveKindIfWrapperType, getRawSuperType, getRawTypeReference, getRawTypes, getSimpleName, getSuperType, getSuperType, getSuperTypes, getType, getTypeArguments, getUniqueIdentifier, getWrapperTypeIfPrimitive, isAnonymous, isInner, isInterfaceType, isPrimitive, isPrimitiveVoid, isRawType, isResolved, isType, isTypeVisible, isWrapper, toInstanceTypeReference, toJavaCompliantTypeReference, tryConvertToArray, tryConvertToListTypecollectSuperTypes, collectSuperTypes, copyInto, createSubstitutor, expose, findNonNullType, findType, getAllSuperTypes, getComponentType, getHumanReadableName, getInvariantBoundSubstitute, getLowerBoundSubstitute, getMultiTypeComponents, getNamedType, getNonInterfaceTypes, getOuter, getOwner, getServices, getSuperTypes, getTypesFactory, getUniqueIdentifier, getUpperBoundSubstitute, hasTypeArguments, internalFindTopLevelType, internalIsAssignableFrom, isAny, isArray, isAssignableFrom, isAssignableFrom, isAssignableFrom, isAssignableFrom, isFunctionType, isMultiType, isSubtypeOf, isSubtypeOf, isSynonym, isUnknown, isValidHint, isWildcard, toJavaCompliantTypeReference, toJavaCompliantTypeReference, toJavaType, toStringpublic FunctionTypeReference(ITypeReferenceOwner owner, org.eclipse.xtext.common.types.JvmType type)
public int getKind()
getKind in class ParameterizedTypeReferenceprotected FunctionTypeReference doCopyInto(ITypeReferenceOwner owner)
doCopyInto in class ParameterizedTypeReferenceprotected void copyTypeArguments(ParameterizedTypeReference result, ITypeReferenceOwner owner)
copyTypeArguments in class ParameterizedTypeReferencepublic java.util.List<LightweightTypeReference> getParameterTypes()
public LightweightTypeReference getReturnType()
public boolean isVisible(IVisibilityHelper visibilityHelper)
LightweightTypeReferencetrue if this type is fully visible according to the given visibilityHelper.
All components and bounds are taken into account, e.g.
arrays use their component type
and generified types check their type arguments, too.isVisible in class ParameterizedTypeReferencepublic boolean isOwnedBy(ITypeReferenceOwner owner)
isOwnedBy in class ParameterizedTypeReferencepublic org.eclipse.xtext.common.types.JvmTypeReference toTypeReference()
toTypeReference in class ParameterizedTypeReferenceprotected org.eclipse.xtext.common.types.JvmTypeReference getEquivalentTypeReference()
public void addParameterType(LightweightTypeReference parameterType)
public void setReturnType(LightweightTypeReference returnType)
protected java.lang.String getAsString(java.lang.String type,
com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
getAsString in class ParameterizedTypeReferencepublic java.lang.String getJavaIdentifier()
getJavaIdentifier in class ParameterizedTypeReferenceprotected java.lang.String getAsStringNoFunctionType(java.lang.String type,
com.google.common.base.Function<LightweightTypeReference,java.lang.String> format)
public void accept(TypeReferenceVisitor visitor)
accept in class ParameterizedTypeReferencepublic <Param> void accept(TypeReferenceVisitorWithParameter<Param> visitor, Param param)
accept in class ParameterizedTypeReferencepublic <Result> Result accept(TypeReferenceVisitorWithResult<Result> visitor)
accept in class ParameterizedTypeReferencepublic <Param,Result> Result accept(TypeReferenceVisitorWithParameterAndResult<Param,Result> visitor, Param param)
accept in class ParameterizedTypeReferencepublic FunctionTypeReference tryConvertToFunctionTypeReference(boolean rawType)
ParameterizedTypeReferenceFunctionTypeReference if the referenced type is a SAM type.
Returns null if this reference does not point to a valid function type.tryConvertToFunctionTypeReference in class ParameterizedTypeReferencerawType - if a raw view on the function type is sufficient.FunctionTypes.tryConvertToFunctionTypeReference(ParameterizedTypeReference, boolean)public FunctionTypeReference getAsFunctionTypeReference()
ParameterizedTypeReferenceFunctionTypeReference if this reference
points to a function or procedure
or if it is already a function type reference.
Otherwise returns null.getAsFunctionTypeReference in class ParameterizedTypeReferenceFunctionTypes.getAsFunctionTypeReference(ParameterizedTypeReference)