public class FunctionTypes
extends java.lang.Object
| Constructor and Description |
|---|
FunctionTypes() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> |
collectAllTypeParameters(LightweightTypeReference closureType,
org.eclipse.xtext.common.types.JvmOperation operation) |
FunctionTypeReference |
createFunctionTypeRef(ITypeReferenceOwner owner,
LightweightTypeReference functionType,
java.util.List<LightweightTypeReference> parameterTypes,
LightweightTypeReference returnType) |
FunctionTypeReference |
createRawFunctionTypeRef(ITypeReferenceOwner owner,
org.eclipse.emf.ecore.EObject context,
int parameterCount,
boolean procedure) |
org.eclipse.xtext.common.types.JvmOperation |
findImplementingOperation(LightweightTypeReference functionType) |
protected org.eclipse.xtext.common.types.JvmOperation |
findImplementingOperation(java.util.List<org.eclipse.xtext.common.types.JvmType> rawTypes) |
protected FunctionTypeReference |
getAsFunctionOrNull(ParameterizedTypeReference typeReference) |
FunctionTypeReference |
getAsFunctionTypeReference(ParameterizedTypeReference typeReference)
|
protected FunctionTypeReference |
getAsProcedureOrNull(ParameterizedTypeReference typeReference) |
FunctionTypeKind |
getFunctionTypeKind(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) |
boolean |
isFunctionAndProcedureAvailable(ITypeReferenceOwner owner) |
protected boolean |
tryAssignTypeArguments(java.util.List<LightweightTypeReference> typeArguments,
FunctionTypeReference result) |
protected FunctionTypeReference |
tryConvertToFunctionTypeReference(ParameterizedTypeReference typeReference,
boolean rawType)
Converts the given reference to a
FunctionTypeReference if the referenced type is a SAM type. |
public java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> collectAllTypeParameters(LightweightTypeReference closureType, org.eclipse.xtext.common.types.JvmOperation operation)
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)
public org.eclipse.xtext.common.types.JvmOperation findImplementingOperation(LightweightTypeReference functionType)
protected org.eclipse.xtext.common.types.JvmOperation findImplementingOperation(java.util.List<org.eclipse.xtext.common.types.JvmType> rawTypes)
public boolean isFunctionAndProcedureAvailable(ITypeReferenceOwner owner)
public FunctionTypeReference createRawFunctionTypeRef(ITypeReferenceOwner owner, org.eclipse.emf.ecore.EObject context, int parameterCount, boolean procedure)
public FunctionTypeReference createFunctionTypeRef(ITypeReferenceOwner owner, LightweightTypeReference functionType, java.util.List<LightweightTypeReference> parameterTypes, LightweightTypeReference returnType)
public FunctionTypeKind getFunctionTypeKind(ParameterizedTypeReference typeReference)
protected FunctionTypeReference tryConvertToFunctionTypeReference(ParameterizedTypeReference typeReference, boolean rawType)
FunctionTypeReference if the referenced type is a SAM type.
Returns null if this reference does not point to a valid function type.
This is the externalized and thereby
exchangeable implementation of ParameterizedTypeReference.tryConvertToFunctionTypeReference(boolean).public FunctionTypeReference getAsFunctionTypeReference(ParameterizedTypeReference typeReference)
FunctionTypeReference if this reference
points to a function or procedure.
Otherwise returns null. This is the externalized and thereby
exchangeable implementation of ParameterizedTypeReference.getAsFunctionTypeReference().protected FunctionTypeReference getAsFunctionOrNull(ParameterizedTypeReference typeReference)
protected FunctionTypeReference getAsProcedureOrNull(ParameterizedTypeReference typeReference)
protected boolean tryAssignTypeArguments(java.util.List<LightweightTypeReference> typeArguments, FunctionTypeReference result)