|
|||||||||
| 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.Reference
org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldReference
public class FieldReference
AspectJ Extension - support for FieldBinding.alwaysNeedsAccessMethod
| 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 |
| Field Summary | |
|---|---|
TypeBinding |
actualReceiverType
|
FieldBinding |
binding
|
TypeBinding |
genericCast
|
long |
nameSourcePosition
|
static int |
READ
|
Expression |
receiver
|
MethodBinding[] |
syntheticAccessors
|
char[] |
token
|
static int |
WRITE
|
| 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 | |
|---|---|
FieldReference(char[] source,
long pos)
|
|
| Method Summary | |
|---|---|
FlowInfo |
analyseAssignment(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
Assignment assignment,
boolean isCompound)
|
FlowInfo |
analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo)
|
FlowInfo |
analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
boolean valueRequired)
More sophisticated for of the flow analysis used for analyzing expressions, and be able to optimize out portions of expressions where no actual value is required. |
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. |
FieldBinding |
fieldBinding()
|
InferenceContext18 |
freshInferenceContext(Scope scope)
When inference for this invocationSite starts, get a fresh inference context, initialized from this site. |
void |
generateAssignment(BlockScope currentScope,
CodeStream codeStream,
Assignment assignment,
boolean valueRequired)
|
void |
generateCode(BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired)
Field reference code generation |
void |
generateCompoundAssignment(BlockScope currentScope,
CodeStream codeStream,
Expression expression,
int operator,
int assignmentImplicitConversion,
boolean valueRequired)
|
void |
generatePostIncrement(BlockScope currentScope,
CodeStream codeStream,
CompoundAssignment postIncrement,
boolean valueRequired)
|
TypeBinding[] |
genericTypeArguments()
|
boolean |
isEquivalent(Reference reference)
Is the given reference equivalent to the receiver, meaning that both denote the same path of field reads? Used from FlowContext.isNullcheckedFieldAccess(Reference). |
boolean |
isSuperAccess()
|
boolean |
isTypeAccess()
|
FieldBinding |
lastFieldBinding()
|
void |
manageSyntheticAccessIfNecessary(BlockScope currentScope,
FlowInfo flowInfo,
boolean isReadAccess)
|
VariableBinding |
nullAnnotatedVariableBinding(boolean supportTypeAnnotations)
Used on the lhs of an assignment for detecting null spec violation. |
Constant |
optimizedBooleanConstant()
Constant usable for bytecode pattern optimizations, but cannot be inlined since it is not strictly equivalent to the definition of constant expressions. |
TypeBinding |
postConversionType(Scope scope)
Returns the type of the expression after required implicit conversions. |
java.lang.StringBuffer |
printExpression(int indent,
java.lang.StringBuffer output)
|
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 |
setFieldIndex(int index)
|
void |
traverse(ASTVisitor visitor,
BlockScope scope)
Traverse an expression in the context of a blockScope |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ast.Reference |
|---|
checkNullableFieldDereference, fieldStore, nullStatus |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement |
|---|
analyseArguments, branchChainTo, checkAgainstNullTypeAnnotation, complainIfUnreachable, expectedType, findConstructorBinding, generateArguments, getExpressionContext, invocationTargetType, 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, receiverIsImplicitThis, 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 |
|---|
getExpressionContext, invocationTargetType, receiverIsImplicitThis, sourceEnd, sourceStart |
| Field Detail |
|---|
public static final int READ
public static final int WRITE
public Expression receiver
public char[] token
public FieldBinding binding
public MethodBinding[] syntheticAccessors
public long nameSourcePosition
public TypeBinding actualReceiverType
public TypeBinding genericCast
| Constructor Detail |
|---|
public FieldReference(char[] source,
long pos)
| Method Detail |
|---|
public FlowInfo analyseAssignment(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
Assignment assignment,
boolean isCompound)
analyseAssignment in class Reference
public FlowInfo analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo)
analyseCode in class Reference
public FlowInfo analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
boolean valueRequired)
Expression
analyseCode in class Expression
public boolean checkNPE(BlockScope scope,
FlowContext flowContext,
FlowInfo flowInfo)
Expression
checkNPE in class Referencescope - 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 FieldBinding fieldBinding()
fieldBinding in class Reference
public void generateAssignment(BlockScope currentScope,
CodeStream codeStream,
Assignment assignment,
boolean valueRequired)
generateAssignment in class Reference
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 - boolean
public void generateCompoundAssignment(BlockScope currentScope,
CodeStream codeStream,
Expression expression,
int operator,
int assignmentImplicitConversion,
boolean valueRequired)
generateCompoundAssignment in class Reference
public void generatePostIncrement(BlockScope currentScope,
CodeStream codeStream,
CompoundAssignment postIncrement,
boolean valueRequired)
generatePostIncrement in class Referencepublic TypeBinding[] genericTypeArguments()
genericTypeArguments in interface InvocationSiteInvocationSite.genericTypeArguments()public InferenceContext18 freshInferenceContext(Scope scope)
InvocationSite
freshInferenceContext in interface InvocationSitepublic boolean isEquivalent(Reference reference)
ReferenceFlowContext.isNullcheckedFieldAccess(Reference).
isEquivalent in class Referencepublic boolean isSuperAccess()
isSuperAccess in interface InvocationSitepublic boolean isTypeAccess()
isTypeAccess in interface InvocationSitepublic FieldBinding lastFieldBinding()
lastFieldBinding in class Reference
public void manageSyntheticAccessIfNecessary(BlockScope currentScope,
FlowInfo flowInfo,
boolean isReadAccess)
public Constant optimizedBooleanConstant()
Expression
optimizedBooleanConstant 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 Expressionpublic void setActualReceiverType(ReferenceBinding receiverType)
setActualReceiverType in interface InvocationSitepublic void setDepth(int depth)
setDepth in interface InvocationSitepublic void setFieldIndex(int index)
setFieldIndex in interface InvocationSite
public void traverse(ASTVisitor visitor,
BlockScope scope)
Expression
traverse in class Expressionpublic VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations)
Expression
nullAnnotatedVariableBinding in class ExpressionsupportTypeAnnotations - if true this causes any variable binding to be used
independent of declaration annotations (for in-depth analysis of type annotations)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||