public class FeatureCallChecker
extends java.lang.Object
Checks whether a given JvmIdentifiableElement
can possibly be called by a
given XAbstractFeatureCall
.
Taken from section 15.12.2.1 Identify Potentially Applicable Methods of the Java Language Specification, the following rules are applied:
Constructor and Description |
---|
FeatureCallChecker() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
_case(JvmConstructor input,
XConstructorCall context,
org.eclipse.emf.ecore.EReference ref,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmConstructor input,
XFeatureCall context,
org.eclipse.emf.ecore.EReference reference,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmField input,
XAssignment context,
org.eclipse.emf.ecore.EReference ref,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmField input,
XFeatureCall context,
org.eclipse.emf.ecore.EReference reference,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmField input,
XMemberFeatureCall context,
org.eclipse.emf.ecore.EReference ref,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmIdentifiableElement input,
XFeatureCall context,
org.eclipse.emf.ecore.EReference ref,
LocalVarDescription description) |
protected java.lang.String |
_case(JvmOperation input,
XAssignment context,
org.eclipse.emf.ecore.EReference ref,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmOperation input,
XBinaryOperation context,
org.eclipse.emf.ecore.EReference ref,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmOperation input,
XFeatureCall context,
org.eclipse.emf.ecore.EReference reference,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmOperation input,
XMemberFeatureCall context,
org.eclipse.emf.ecore.EReference ref,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(JvmOperation input,
XUnaryOperation context,
org.eclipse.emf.ecore.EReference reference,
JvmFeatureDescription jvmFeatureDescription) |
protected java.lang.String |
_case(java.lang.Object input,
java.lang.Object context,
org.eclipse.emf.ecore.EReference ref,
IValidatedEObjectDescription description) |
protected boolean |
areArgumentTypesValid(JvmExecutable exectuable,
java.util.List<XExpression> arguments,
ITypeArgumentContext typeArgumentContext) |
protected java.util.List<java.util.EnumSet<TypeConformanceResult.Kind>> |
areGenericArgumentTypesValid(JvmExecutable exectuable,
java.util.List<XExpression> arguments,
ITypeArgumentContext typeArgumentContext) |
protected java.lang.String |
checkJvmOperation(JvmExecutable executable,
XAbstractFeatureCall featureCall,
boolean isExplicitOperationCall,
JvmFeatureDescription jvmFeatureDescription) |
boolean |
checkTypesWithGenerics(IEObjectDescription input) |
protected boolean |
checkTypesWithGenerics(JvmFeatureDescription featureDescription,
JvmExecutable executable,
java.util.List<XExpression> actualArguments,
ITypeArgumentContext typeContext) |
boolean |
checkTypesWithoutGenerics(IEObjectDescription input) |
protected boolean |
checkTypesWithoutGenerics(JvmFeatureDescription featureDescription,
JvmExecutable executable,
java.util.List<XExpression> actualArguments) |
java.lang.String |
checkWithoutTypes(IEObjectDescription input) |
protected <T> T |
doCheck(IValidatedEObjectDescription input,
com.google.inject.Provider<T> validator) |
protected ITypeProvider |
getTypeProvider() |
void |
initialize(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference) |
protected boolean |
isSugaredMethodInvocationWithoutParanthesis(JvmFeatureDescription jvmFeatureDescription) |
protected boolean |
isValidNumberOfArguments(JvmExecutable executable,
java.util.List<XExpression> arguments) |
void |
setTypeProvider(ITypeProvider typeProvider) |
public void setTypeProvider(ITypeProvider typeProvider)
protected ITypeProvider getTypeProvider()
public void initialize(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
public boolean checkTypesWithGenerics(IEObjectDescription input)
protected boolean checkTypesWithGenerics(JvmFeatureDescription featureDescription, JvmExecutable executable, java.util.List<XExpression> actualArguments, ITypeArgumentContext typeContext)
public java.lang.String checkWithoutTypes(IEObjectDescription input)
public boolean checkTypesWithoutGenerics(IEObjectDescription input)
protected boolean checkTypesWithoutGenerics(JvmFeatureDescription featureDescription, JvmExecutable executable, java.util.List<XExpression> actualArguments)
protected <T> T doCheck(IValidatedEObjectDescription input, com.google.inject.Provider<T> validator)
protected java.lang.String _case(java.lang.Object input, java.lang.Object context, org.eclipse.emf.ecore.EReference ref, IValidatedEObjectDescription description)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).description
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmConstructor input, XConstructorCall context, org.eclipse.emf.ecore.EReference ref, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmOperation input, XBinaryOperation context, org.eclipse.emf.ecore.EReference ref, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmOperation input, XAssignment context, org.eclipse.emf.ecore.EReference ref, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmField input, XAssignment context, org.eclipse.emf.ecore.EReference ref, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmField input, XMemberFeatureCall context, org.eclipse.emf.ecore.EReference ref, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmIdentifiableElement input, XFeatureCall context, org.eclipse.emf.ecore.EReference ref, LocalVarDescription description)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).description
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmField input, XFeatureCall context, org.eclipse.emf.ecore.EReference reference, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).reference
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmOperation input, XMemberFeatureCall context, org.eclipse.emf.ecore.EReference ref, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).ref
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmOperation input, XFeatureCall context, org.eclipse.emf.ecore.EReference reference, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).reference
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmConstructor input, XFeatureCall context, org.eclipse.emf.ecore.EReference reference, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).reference
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String _case(JvmOperation input, XUnaryOperation context, org.eclipse.emf.ecore.EReference reference, JvmFeatureDescription jvmFeatureDescription)
input
- the input element (dispatch parameter).context
- the context element (dispatch parameter).reference
- the reference that potentially points from context
to input
(dispatch parameter).jvmFeatureDescription
- the description for the input
(dispatch parameter).protected java.lang.String checkJvmOperation(JvmExecutable executable, XAbstractFeatureCall featureCall, boolean isExplicitOperationCall, JvmFeatureDescription jvmFeatureDescription)
protected boolean areArgumentTypesValid(JvmExecutable exectuable, java.util.List<XExpression> arguments, ITypeArgumentContext typeArgumentContext)
protected java.util.List<java.util.EnumSet<TypeConformanceResult.Kind>> areGenericArgumentTypesValid(JvmExecutable exectuable, java.util.List<XExpression> arguments, ITypeArgumentContext typeArgumentContext)
protected boolean isValidNumberOfArguments(JvmExecutable executable, java.util.List<XExpression> arguments)
protected boolean isSugaredMethodInvocationWithoutParanthesis(JvmFeatureDescription jvmFeatureDescription)