|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode
org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement
org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend
public class MessageSend
AspectJ Extension - support for MethodBinding.alwaysNeedsAccessMethod Possible mergeconflict? Was InvocationSite but now Invocation in implements clause
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.lookup.InvocationSite |
|---|
InvocationSite.EmptyWithAstNode |
| Nested classes/interfaces inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeConstants |
|---|
TypeConstants.CloseMethodRecord |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression |
|---|
constant, implicitConversion, resolvedType, statementEnd |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement |
|---|
COMPLAINED_FAKE_REACHABLE, COMPLAINED_UNREACHABLE, NOT_COMPLAINED |
| Constructor Summary | |
|---|---|
MessageSend()
|
|
| Method Summary | |
|---|---|
FlowInfo |
analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo)
|
Expression[] |
arguments()
|
MethodBinding |
binding(TypeBinding targetType,
boolean reportErrors,
Scope scope)
Answer the resolved method binding of this invocation. |
TypeBinding |
checkAgainstFinalTargetType(TypeBinding targetType,
Scope scope)
Once outer contexts have finalized the target type for this expression, perform any checks that might have been delayed previously. |
boolean |
checkNPE(BlockScope scope,
FlowContext flowContext,
FlowInfo flowInfo)
Check this expression against potential NPEs, which may occur: if the expression is the receiver in a field access, qualified allocation, array reference or message send incl. |
void |
computeConversion(Scope scope,
TypeBinding runtimeTimeType,
TypeBinding compileTimeType)
Base types need that the widening is explicitly done by the compiler using some bytecode like i2f. |
protected void |
findMethodBinding(BlockScope scope,
TypeBinding[] argumentTypes)
Find the method binding; if this.innersNeedUpdate allow for two attempts where the first round may stop after applicability checking (18.5.1) to include more information into the final invocation type inference (18.5.2). |
InferenceContext18 |
freshInferenceContext(Scope scope)
When inference for this invocationSite starts, get a fresh inference context, initialized from this site. |
void |
generateCode(BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired)
MessageSend code generation |
TypeBinding[] |
genericTypeArguments()
|
ExpressionContext |
getExpressionContext()
|
InferenceContext18 |
getInferenceContext(ParameterizedMethodBinding method)
Retrieve an inference context for the given method which must have been registered using Invocation.registerInferenceContext(ParameterizedGenericMethodBinding, InferenceContext18). |
InnerInferenceHelper |
innerInferenceHelper()
If this invocation has any poly expressions as arguments, this method answers an inference helper that mediates during overload resolution, even if no actual inference happens for this invocation. |
boolean |
innersNeedUpdate()
Answer whether the current invocation has inner expressions that still need updating after inference. |
void |
innerUpdateDone()
Mark that updating (the need for which is signaled via Invocation.innersNeedUpdate()) has been done. |
TypeBinding |
invocationTargetType()
Implementation of InvocationSite.invocationTargetType()
suitable at this level. |
boolean |
isPolyExpression()
|
boolean |
isPolyExpression(MethodBinding resolutionCandidate)
Variant of isPolyExpression() to be used during type inference, when a resolution candidate exists. |
boolean |
isSuperAccess()
|
boolean |
isTypeAccess()
|
void |
manageSyntheticAccessIfNecessary(BlockScope currentScope,
FlowInfo flowInfo)
|
int |
nullStatus(FlowInfo flowInfo,
FlowContext flowContext)
|
TypeBinding |
postConversionType(Scope scope)
Returns the type of the expression after required implicit conversions. |
java.lang.StringBuffer |
printExpression(int indent,
java.lang.StringBuffer output)
|
boolean |
receiverIsImplicitThis()
|
void |
registerInferenceContext(ParameterizedGenericMethodBinding method,
InferenceContext18 infCtx18)
Register the given inference context, which produced the given method as its intermediate result. |
protected void |
resolveMethodBinding(BlockScope scope,
TypeBinding[] argumentTypes)
|
TypeBinding |
resolveType(BlockScope scope)
Resolve the type of this expression in the context of a blockScope |
void |
setActualReceiverType(ReferenceBinding receiverType)
|
void |
setDepth(int depth)
|
void |
setExpectedType(TypeBinding expectedType)
Record the type expectation before this expression is typechecked. |
void |
setExpressionContext(ExpressionContext context)
|
void |
setFieldIndex(int depth)
|
boolean |
sIsMoreSpecific(TypeBinding s,
TypeBinding t,
Scope scope)
|
boolean |
statementExpression()
|
void |
traverse(ASTVisitor visitor,
BlockScope blockScope)
Traverse an expression in the context of a blockScope |
boolean |
updateBindings(MethodBinding updatedBinding,
TypeBinding targetType)
Where the AST node may hold references to the results of Invocation Applicability Inference, this method allows to update those references to the result of Invocation Type Inference. |
boolean |
usesInference()
Answer true if this invocation has determined its binding using inference. |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement |
|---|
analyseArguments, branchChainTo, checkAgainstNullTypeAnnotation, complainIfUnreachable, expectedType, findConstructorBinding, generateArguments, isBoxingCompatible, isEmptyBlock, isKnowDeadCodePattern, isValidJavaStatement, recordExceptionsForEnclosingLambda, resolveCase |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode |
|---|
checkInvocationArguments, concreteStatement, copySE8AnnotationsToType, isFieldUseDeprecated, isImplicitThis, isMethodUseDeprecated, isSuper, isThis, isTypeUseDeprecated, isUnqualifiedSuper, printAnnotations, printIndent, printModifiers, resolveAnnotations, resolveAnnotations, resolveAnnotations, resolveDeprecatedAnnotations, resolvePolyExpressionArguments, resolvePolyExpressionArguments, sourceEnd, sourceStart, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.lookup.InvocationSite |
|---|
sourceEnd, sourceStart |
| Field Detail |
|---|
public Expression receiver
public char[] selector
public Expression[] arguments
public MethodBinding binding
public MethodBinding syntheticAccessor
public TypeBinding expectedType
public long nameSourcePosition
public TypeBinding actualReceiverType
public TypeBinding valueCast
public TypeReference[] typeArguments
public TypeBinding[] genericTypeArguments
protected InnerInferenceHelper innerInferenceHelper
| Constructor Detail |
|---|
public MessageSend()
| Method Detail |
|---|
public FlowInfo analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo)
analyseCode in class Expression
public boolean checkNPE(BlockScope scope,
FlowContext flowContext,
FlowInfo flowInfo)
Expression
checkNPE in class Expressionscope - the scope of the analysisflowContext - the current flow contextflowInfo - the upstream flow info; caveat: may get modified
public void computeConversion(Scope scope,
TypeBinding runtimeTimeType,
TypeBinding compileTimeType)
Expression
computeConversion in class ExpressionExpression.computeConversion(org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope, org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
public void generateCode(BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired)
generateCode in class ExpressioncurrentScope - org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScopecodeStream - org.aspectj.org.eclipse.jdt.internal.compiler.codegen.CodeStreamvalueRequired - booleanpublic TypeBinding[] genericTypeArguments()
genericTypeArguments in interface InvocationSiteInvocationSite.genericTypeArguments()public boolean isSuperAccess()
isSuperAccess in interface InvocationSitepublic boolean isTypeAccess()
isTypeAccess in interface InvocationSite
public void manageSyntheticAccessIfNecessary(BlockScope currentScope,
FlowInfo flowInfo)
public int nullStatus(FlowInfo flowInfo,
FlowContext flowContext)
nullStatus in class Expressionpublic TypeBinding postConversionType(Scope scope)
Expression
postConversionType in class ExpressionExpression.postConversionType(Scope)
public java.lang.StringBuffer printExpression(int indent,
java.lang.StringBuffer output)
printExpression in class Expressionpublic TypeBinding resolveType(BlockScope scope)
Expression
resolveType in class Expression
protected void findMethodBinding(BlockScope scope,
TypeBinding[] argumentTypes)
public TypeBinding checkAgainstFinalTargetType(TypeBinding targetType,
Scope scope)
Expression
checkAgainstFinalTargetType in class ExpressiontargetType - the final target type (aka expectedType) for this expression.scope - scope for error reportingpublic void setActualReceiverType(ReferenceBinding receiverType)
setActualReceiverType in interface InvocationSitepublic void setDepth(int depth)
setDepth in interface InvocationSitepublic void setExpectedType(TypeBinding expectedType)
Expression
setExpectedType in class ExpressionexpectedType - The type denoting an expectation in the context of an assignment conversionExpression.setExpectedType(org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding)public void setExpressionContext(ExpressionContext context)
setExpressionContext in class Expressionpublic boolean isPolyExpression()
isPolyExpression in class Expressionpublic boolean isPolyExpression(MethodBinding resolutionCandidate)
isPolyExpression in class Expression
public boolean sIsMoreSpecific(TypeBinding s,
TypeBinding t,
Scope scope)
sIsMoreSpecific in class Expressionpublic void setFieldIndex(int depth)
setFieldIndex in interface InvocationSitepublic TypeBinding invocationTargetType()
StatementInvocationSite.invocationTargetType()
suitable at this level. Subclasses should override as necessary.
invocationTargetType in interface InvocationSiteinvocationTargetType in class StatementInvocationSite.invocationTargetType()
public void traverse(ASTVisitor visitor,
BlockScope blockScope)
Expression
traverse in class Expressionpublic boolean statementExpression()
statementExpression in class Expressionpublic boolean receiverIsImplicitThis()
receiverIsImplicitThis in interface InvocationSitereceiverIsImplicitThis in class ASTNode
public MethodBinding binding(TypeBinding targetType,
boolean reportErrors,
Scope scope)
Invocation
binding in interface InvocationtargetType - the target type of this invocation or null if not yet knownreportErrors - if true then this is the last call, if no valid binding can be answered we should report an errorscope - if reportErrors is true then this scope can be used for error reportingpublic Expression[] arguments()
arguments in interface Invocationpublic ExpressionContext getExpressionContext()
getExpressionContext in interface InvocationSitegetExpressionContext in class Statement
public void registerInferenceContext(ParameterizedGenericMethodBinding method,
InferenceContext18 infCtx18)
InvocationInvocationSite.getExpressionContext()
to continue the type inference.
registerInferenceContext in interface Invocationpublic InferenceContext18 getInferenceContext(ParameterizedMethodBinding method)
InvocationInvocation.registerInferenceContext(ParameterizedGenericMethodBinding, InferenceContext18).
getInferenceContext in interface Invocationmethod - an intermediate resolved candidate for this invocation
return a suspended inference context or null if none was registered for this method.public boolean usesInference()
Invocation
usesInference in interface Invocation
public boolean updateBindings(MethodBinding updatedBinding,
TypeBinding targetType)
Invocation
updateBindings in interface InvocationupdatedBinding - the final method binding after full inferencetargetType - the target type used during Invocation Type Inference
public boolean innersNeedUpdate()
Invocation
innersNeedUpdate in interface Invocationpublic void innerUpdateDone()
InvocationInvocation.innersNeedUpdate()) has been done.
innerUpdateDone in interface Invocationpublic InnerInferenceHelper innerInferenceHelper()
Invocation
innerInferenceHelper in interface Invocationpublic InferenceContext18 freshInferenceContext(Scope scope)
InvocationSite
freshInferenceContext in interface InvocationSite
protected void resolveMethodBinding(BlockScope scope,
TypeBinding[] argumentTypes)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||