Class FunctionTypes
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.references.FunctionTypes
-
public class FunctionTypes extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FunctionTypes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>collectAllTypeParameters(LightweightTypeReference closureType, org.eclipse.xtext.common.types.JvmOperation operation)FunctionTypeReferencecreateFunctionTypeRef(ITypeReferenceOwner owner, LightweightTypeReference functionType, java.util.List<LightweightTypeReference> parameterTypes, LightweightTypeReference returnType)FunctionTypeReferencecreateRawFunctionTypeRef(ITypeReferenceOwner owner, org.eclipse.emf.ecore.EObject context, int parameterCount, boolean procedure)protected org.eclipse.xtext.common.types.JvmOperationfindImplementingOperation(java.util.List<org.eclipse.xtext.common.types.JvmType> rawTypes)org.eclipse.xtext.common.types.JvmOperationfindImplementingOperation(LightweightTypeReference functionType)protected FunctionTypeReferencegetAsFunctionOrNull(ParameterizedTypeReference typeReference)FunctionTypeReferencegetAsFunctionTypeReference(ParameterizedTypeReference typeReference)protected FunctionTypeReferencegetAsProcedureOrNull(ParameterizedTypeReference typeReference)FunctionTypeKindgetFunctionTypeKind(ParameterizedTypeReference typeReference)java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,java.util.List<LightweightBoundTypeArgument>>getFunctionTypeParameterMapping(LightweightTypeReference functionType, org.eclipse.xtext.common.types.JvmOperation operation, ActualTypeArgumentCollector typeArgumentCollector, ITypeReferenceOwner owner)booleanisFunctionAndProcedureAvailable(ITypeReferenceOwner owner)protected booleantryAssignTypeArguments(java.util.List<LightweightTypeReference> typeArguments, FunctionTypeReference result)protected FunctionTypeReferencetryConvertToFunctionTypeReference(ParameterizedTypeReference typeReference, boolean rawType)Converts the given reference to aFunctionTypeReferenceif the referenced type is a SAM type.
-
-
-
Method Detail
-
collectAllTypeParameters
public java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> collectAllTypeParameters(LightweightTypeReference closureType, org.eclipse.xtext.common.types.JvmOperation operation)
-
getFunctionTypeParameterMapping
public java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,java.util.List<LightweightBoundTypeArgument>> getFunctionTypeParameterMapping(LightweightTypeReference functionType, org.eclipse.xtext.common.types.JvmOperation operation, ActualTypeArgumentCollector typeArgumentCollector, ITypeReferenceOwner owner)
-
findImplementingOperation
public org.eclipse.xtext.common.types.JvmOperation findImplementingOperation(LightweightTypeReference functionType)
-
findImplementingOperation
protected org.eclipse.xtext.common.types.JvmOperation findImplementingOperation(java.util.List<org.eclipse.xtext.common.types.JvmType> rawTypes)
-
isFunctionAndProcedureAvailable
public boolean isFunctionAndProcedureAvailable(ITypeReferenceOwner owner)
-
createRawFunctionTypeRef
public FunctionTypeReference createRawFunctionTypeRef(ITypeReferenceOwner owner, org.eclipse.emf.ecore.EObject context, int parameterCount, boolean procedure)
-
createFunctionTypeRef
public FunctionTypeReference createFunctionTypeRef(ITypeReferenceOwner owner, LightweightTypeReference functionType, java.util.List<LightweightTypeReference> parameterTypes, LightweightTypeReference returnType)
-
getFunctionTypeKind
public FunctionTypeKind getFunctionTypeKind(ParameterizedTypeReference typeReference)
-
tryConvertToFunctionTypeReference
protected FunctionTypeReference tryConvertToFunctionTypeReference(ParameterizedTypeReference typeReference, boolean rawType)
Converts the given reference to aFunctionTypeReferenceif the referenced type is a SAM type. Returnsnullif this reference does not point to a valid function type. This is the externalized and thereby exchangeable implementation ofParameterizedTypeReference.tryConvertToFunctionTypeReference(boolean).
-
getAsFunctionTypeReference
public FunctionTypeReference getAsFunctionTypeReference(ParameterizedTypeReference typeReference)
Returns the equivalentFunctionTypeReferenceif this reference points to afunctionorprocedure. Otherwise returnsnull. This is the externalized and thereby exchangeable implementation ofParameterizedTypeReference.getAsFunctionTypeReference().
-
getAsFunctionOrNull
protected FunctionTypeReference getAsFunctionOrNull(ParameterizedTypeReference typeReference)
-
getAsProcedureOrNull
protected FunctionTypeReference getAsProcedureOrNull(ParameterizedTypeReference typeReference)
-
tryAssignTypeArguments
protected boolean tryAssignTypeArguments(java.util.List<LightweightTypeReference> typeArguments, FunctionTypeReference result)
-
-