public class XbaseBatchTypeProvider extends java.lang.Object implements ITypeProvider
Constructor and Description |
---|
XbaseBatchTypeProvider() |
Modifier and Type | Method and Description |
---|---|
JvmTypeReference |
getCommonReturnType(XExpression expression,
boolean assumeImplicitReturn)
The return type of an expression is the common super type of all types used within a return expression.
|
JvmTypeReference |
getExpectedReturnType(XExpression expression,
boolean rawType)
Return the expected return type of the given expression.
|
JvmTypeReference |
getExpectedType(XExpression expression)
Return the resolved expected type of the given expression.
|
JvmTypeReference |
getExpectedType(XExpression expression,
boolean rawType) |
protected IResolvedTypes |
getResolvedTypes(org.eclipse.emf.ecore.EObject object) |
JvmTypeReference |
getType(XExpression expression)
Return the resolved type of the given expression.
|
JvmTypeReference |
getType(XExpression expression,
boolean rawType) |
JvmTypeReference |
getType(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType) |
JvmTypeReference |
getTypeForIdentifiable(JvmIdentifiableElement identifiableElement)
Return the resolved type of the element.
|
JvmTypeReference |
getTypeForIdentifiable(JvmIdentifiableElement identifiableElement,
boolean rawType) |
protected IResolvedTypes getResolvedTypes(org.eclipse.emf.ecore.EObject object)
public JvmTypeReference getExpectedReturnType(XExpression expression, boolean rawType)
ITypeProvider
getExpectedReturnType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.null
if no special return type is expectedpublic JvmTypeReference getExpectedType(XExpression expression)
ITypeProvider
getExpectedType(expression, false
.getExpectedType
in interface ITypeProvider
expression
- the expression. May not be null
.null
if no special type is expectedpublic JvmTypeReference getExpectedType(XExpression expression, boolean rawType)
getExpectedType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.null
if no special type is expectedpublic JvmTypeReference getType(XExpression expression)
ITypeProvider
getType(expression, false
.getType
in interface ITypeProvider
expression
- the expression. May not be null
.XExpression
, if a correct, fully-linkable model is given.
null
indicates a problem during resolution.public JvmTypeReference getType(XExpression expression, boolean rawType)
getType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.XExpression
, if a correct, fully-linkable model is given.
null
indicates a problem during resolution.public JvmTypeReference getType(XExpression expression, JvmTypeReference rawExpectation, boolean rawType)
getType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.XExpression
, if a correct, fully-linkable model is given.
null
indicates a problem during resolution.public JvmTypeReference getTypeForIdentifiable(JvmIdentifiableElement identifiableElement)
ITypeProvider
getTypeForIdentifiable(identifiableElement, false
.getTypeForIdentifiable
in interface ITypeProvider
identifiableElement
- the identifiable element. May not be null
.JvmIdentifiableElement
, if a correct, fully-linkable model is
given. null
indicates a problem during resolution. given.public JvmTypeReference getTypeForIdentifiable(JvmIdentifiableElement identifiableElement, boolean rawType)
getTypeForIdentifiable
in interface ITypeProvider
identifiableElement
- the identifiable element. May not be null
.rawType
- true
if the raw type is sufficient.JvmIdentifiableElement
, if a correct, fully-linkable model is
given. null
indicates a problem during resolution. given.public JvmTypeReference getCommonReturnType(XExpression expression, boolean assumeImplicitReturn)
ITypeProvider
getCommonReturnType
in interface ITypeProvider
expression
- May not be null
.assumeImplicitReturn
- indicating whether an implicit return expression should be assumedXExpression
, if a correct, fully-linkable model is
given. null
indicates a problem during computation, the primitive void indicates that no return expression was found.