| Package | Description |
|---|---|
| org.eclipse.xtext.xbase.annotations.typesystem | |
| org.eclipse.xtext.xbase.typesystem |
This package is the entry point for clients of the Xbase type inference.
|
| org.eclipse.xtext.xbase.typesystem.computation |
This package contains the primary hooks for the actual type computation in Xbase
as well as their respective base implementations.
|
| org.eclipse.xtext.xbase.typesystem.internal |
| Modifier and Type | Method and Description |
|---|---|
protected void |
XbaseWithAnnotationsTypeComputer._computeTypes(XAnnotation object,
ITypeComputationState state) |
protected void |
XbaseWithAnnotationsTypeComputer.computeChildTypesForUnknownAnnotation(XAnnotation object,
ITypeComputationState state) |
protected void |
XbaseWithAnnotationsTypeComputer.computeTypes(XAnnotation annotation,
JvmOperation operation,
XExpression value,
ITypeComputationState state) |
void |
XbaseWithAnnotationsTypeComputer.computeTypes(XExpression expression,
ITypeComputationState state) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
LocalVariableCapturer.capture(ITypeComputationState state) |
static void |
LocalVariableCapturer.captureLocalVariables(JvmDeclaredType localType,
ITypeComputationState state) |
static void |
LocalVariableCapturer.captureLocalVariables(JvmTypeReference typeReference,
ITypeComputationState state) |
| Modifier and Type | Method and Description |
|---|---|
protected ITypeComputationState |
UnknownClosureTypeHelper.assignParameters(ITypeAssigner typeAssigner) |
protected ITypeComputationState |
ClosureWithExpectationHelper.assignParameters(ITypeAssigner typeAssigner) |
protected ITypeComputationState |
ClosureWithoutExpectationHelper.assignParameters(ITypeAssigner typeAssigner,
FunctionTypeReference incompleteClosureType) |
protected ITypeComputationState |
XbaseTypeComputer.assignType(JvmFormalParameter param,
LightweightTypeReference type,
ITypeComputationState state) |
ITypeComputationState |
ITypeComputationState.assignType(JvmIdentifiableElement element,
LightweightTypeReference type)
Assigns the type to the given element and makes the element available in the scope.
|
ITypeComputationState |
ITypeComputationState.assignType(JvmIdentifiableElement element,
LightweightTypeReference type,
boolean addToChildScope)
Assigns the given type to the given element and optionally adds the element to the scope.
|
protected ITypeComputationState |
UnknownClosureTypeHelper.getClosureBodyTypeComputationState(ITypeAssigner typeAssigner) |
protected ITypeComputationState |
ClosureWithExpectationHelper.getClosureBodyTypeComputationState(ITypeAssigner typeAssigner) |
protected ITypeComputationState |
ClosureWithoutExpectationHelper.getClosureBodyTypeComputationState(ITypeAssigner typeAssigner,
FunctionTypeReference incompleteClosureType) |
ITypeComputationState |
ITypeAssigner.getForkedState()
Returns the forked state that knows about the newly assigned types.
|
protected ITypeComputationState |
ClosureTypeComputer.getState() |
protected ITypeComputationState |
AbstractClosureTypeHelper.getState() |
protected ITypeComputationState |
XbaseTypeComputer.getSwitchExpressionState(XSwitchExpression expr,
ITypeComputationState state) |
protected ITypeComputationState |
XbaseTypeComputer.reassignCheckedType(XExpression condition,
XExpression guardedExpression,
ITypeComputationState state)
If the condition is a
type check, the checked expression
will be automatically casted in the returned state. |
ITypeComputationState |
ITypeComputationState.withExpectation(LightweightTypeReference expectation)
The given expectation will be resolved if it contains unresolved type
arguments, e.g. an operation that declares two parameters of the very
same type argument will yield a more detailed expectation if possible.
|
ITypeComputationState |
ITypeComputationState.withExpectedExceptions(List<LightweightTypeReference> declaredExceptionTypes) |
ITypeComputationState |
ITypeComputationState.withNonVoidExpectation()
Keep the current return expectation and assume an actual expectation that is not void.
|
ITypeComputationState |
ITypeComputationState.withoutExpectation()
Keeps the return type expectation.
|
ITypeComputationState |
ITypeComputationState.withoutRootExpectation()
The outer context is ignored for child expressions and the newly produced context
does not impose any restrictions on the expectation.
|
ITypeComputationState |
ITypeComputationState.withReturnExpectation()
Transfers the available return type expectation to the actual expectation of this
computation step.
|
ITypeComputationState |
ITypeComputationState.withRootExpectation(LightweightTypeReference expectation)
The given expectation becomes the expected return type and the expected type for
the current context.
|
ITypeComputationState |
ITypeComputationState.withTypeCheckpoint(org.eclipse.emf.ecore.EObject context)
A type checkpoint allows to re-specify the type of an identifiable that was already
type-computed.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
XbaseTypeComputer._computeTypes(XAbstractFeatureCall featureCall,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XAssignment assignment,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XBasicForLoopExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XBlockExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XBooleanLiteral object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XCastedExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XClosure object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XConstructorCall constructorCall,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XDoWhileExpression object,
ITypeComputationState state)
Since we are sure that the loop body is executed at least once, the early exit information
of the loop body expression can be used for the outer expression.
|
protected void |
XbaseTypeComputer._computeTypes(XForLoopExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XIfExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XInstanceOfExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XListLiteral literal,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XNullLiteral object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XNumberLiteral object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XReturnExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XSetLiteral literal,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XStringLiteral object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XSwitchExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XSynchronizedExpression expr,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XThrowExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XTryCatchFinallyExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XTypeLiteral object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XVariableDeclaration object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer._computeTypes(XWhileExpression object,
ITypeComputationState state) |
protected void |
XbaseTypeComputer.addLocalToCurrentScope(XExpression expression,
ITypeComputationState state)
If the expression is a variable declaration, then add it to the current scope;
DSLs introducing new containers for variable declarations should override this method
and explicitly add nested variable declarations.
|
protected void |
XbaseTypeComputer.addLocalToCurrentScope(XVariableDeclaration localVariable,
ITypeComputationState state) |
protected ITypeComputationState |
XbaseTypeComputer.assignType(JvmFormalParameter param,
LightweightTypeReference type,
ITypeComputationState state) |
protected void |
CollectionLiteralsTypeComputer.computeArrayLiteralType(XListLiteral literal,
LightweightTypeReference expectedArrayType,
ITypeExpectation expectation,
ITypeComputationState state) |
protected List<LightweightTypeReference> |
CollectionLiteralsTypeComputer.computeCollectionTypeCandidates(XCollectionLiteral literal,
JvmGenericType collectionType,
LightweightTypeReference elementTypeExpectation,
ITypeComputationState state)
Creates a list of collection type references from the element types of a collection literal.
|
protected LightweightTypeReference |
XbaseTypeComputer.computeForLoopParameterType(XForLoopExpression object,
ITypeComputationState state) |
void |
CollectionLiteralsTypeComputer.computeType(XListLiteral literal,
ITypeComputationState state)
Entry point from the
XbaseTypeComputer. |
protected void |
CollectionLiteralsTypeComputer.computeType(XListLiteral literal,
JvmGenericType listType,
ITypeExpectation expectation,
ITypeComputationState state) |
void |
CollectionLiteralsTypeComputer.computeType(XSetLiteral literal,
ITypeComputationState state)
Entry point from the
XbaseTypeComputer. |
protected void |
CollectionLiteralsTypeComputer.computeType(XSetLiteral literal,
JvmGenericType setType,
JvmGenericType mapType,
ITypeExpectation expectation,
ITypeComputationState state) |
void |
XbaseTypeComputer.computeTypes(XExpression expression,
ITypeComputationState state) |
void |
ITypeComputer.computeTypes(XExpression expression,
ITypeComputationState state)
Compute the type for the given expression in the context of the given computation state.
|
protected ITypeComputationResult |
CollectionLiteralsTypeComputer.computeTypes(XExpression element,
LightweightTypeReference expectation,
ITypeComputationState state) |
protected ITypeComputationResult |
XbaseTypeComputer.computeWhileLoopBody(XAbstractWhileExpression object,
ITypeComputationState state,
boolean autocast) |
protected void |
AbstractTypeComputer.deferredBindTypeArgument(LightweightTypeReference declared,
LightweightTypeReference actual,
ITypeComputationState state) |
protected <Type extends JvmType> |
AbstractTypeComputer.findDeclaredType(Class<?> clazz,
ITypeComputationState state) |
protected LightweightTypeReference |
CollectionLiteralsTypeComputer.getCommonSuperType(List<LightweightTypeReference> types,
ITypeComputationState state)
Specializes the super implementation such that is allows an empty list of types.
|
protected LightweightTypeReference |
AbstractTypeComputer.getCommonSuperType(List<LightweightTypeReference> types,
ITypeComputationState state)
Computes the common super type for the given list of types.
|
protected LightweightTypeReference |
XbaseTypeComputer.getDeclaredParameterType(JvmFormalParameter declaredParam,
ITypeComputationState state) |
protected LightweightTypeReference |
CollectionLiteralsTypeComputer.getElementOrComponentType(LightweightTypeReference iterableOrArray,
ITypeComputationState state) |
protected LightweightTypeReference |
AbstractTypeComputer.getPrimitiveVoid(ITypeComputationState state) |
protected LightweightTypeReference |
AbstractTypeComputer.getRawTypeForName(Class<?> clazz,
ITypeComputationState state) |
protected JvmIdentifiableElement |
XbaseTypeComputer.getRefinableCandidate(XExpression object,
ITypeComputationState state) |
protected ITypeComputationState |
XbaseTypeComputer.getSwitchExpressionState(XSwitchExpression expr,
ITypeComputationState state) |
protected LightweightTypeReference |
AbstractTypeComputer.getTypeForName(Class<?> clazz,
ITypeComputationState state) |
protected void |
CollectionLiteralsTypeComputer.handleCollectionTypeNotAvailable(XCollectionLiteral literal,
ITypeComputationState state,
Class<?> clazz)
Process all children and assign an unknown type to the literal.
|
protected ITypeComputationState |
XbaseTypeComputer.reassignCheckedType(XExpression condition,
XExpression guardedExpression,
ITypeComputationState state)
If the condition is a
type check, the checked expression
will be automatically casted in the returned state. |
protected void |
CollectionLiteralsTypeComputer.refineElementTypeExpectation(XCollectionLiteral literal,
LightweightTypeReference expectation,
ITypeComputationState state) |
protected void |
CollectionLiteralsTypeComputer.setUnboundCollectionType(XCollectionLiteral literal,
JvmGenericType collectionType,
ITypeExpectation expectation,
LightweightTypeReference elementTypeExpectation,
ITypeComputationState state) |
| Constructor and Description |
|---|
AbstractClosureTypeHelper(XClosure closure,
ITypeExpectation expectation,
ITypeComputationState state) |
ClosureTypeComputer(XClosure closure,
ITypeExpectation expectation,
ITypeComputationState state) |
ClosureWithExpectationHelper(XClosure closure,
JvmOperation operation,
ITypeExpectation expectation,
ITypeComputationState state) |
ClosureWithoutExpectationHelper(XClosure closure,
ITypeExpectation expectation,
ITypeComputationState state) |
UnknownClosureTypeHelper(XClosure closure,
ITypeExpectation expectation,
ITypeComputationState state) |
XbaseTypeComputer.BranchExpressionProcessor(ITypeComputationState state,
XExpression expression) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
LogicalContainerAwareReentrantTypeResolver.addExtensionProviders(ITypeComputationState state,
List<JvmFormalParameter> parameters) |
protected void |
LogicalContainerAwareReentrantTypeResolver.LocalVariableCapturerImpl.capture(ITypeComputationState state) |
protected ITypeExpectation |
AbstractTypeComputationState.getSingleExpectation(ITypeComputationState state) |
protected abstract ForwardingTypeComputationState |
ForwardingTypeComputationState.newForwardingTypeComputationState(ITypeComputationState delegate) |
protected void |
ResolvedFeature.resolveArgumentType(XExpression argument,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
protected void |
FeatureLinkingCandidate.resolveArgumentType(XExpression argument,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
protected void |
AbstractLinkingCandidate.resolveArgumentType(XExpression argument,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
protected void |
ResolvedFeature.resolveKnownArgumentType(XExpression argument,
LightweightTypeReference knownType,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
protected void |
FeatureLinkingCandidate.resolveKnownArgumentType(XExpression argument,
LightweightTypeReference knownType,
LightweightTypeReference declaredType,
ITypeComputationState argumentState) |
| Constructor and Description |
|---|
ForwardingTypeComputationState(ITypeComputationState delegate) |
Copyright © 2015. All Rights Reserved.