org.eclipse.jdt.internal.compiler.lookup
类 MethodScope

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.lookup.Scope
      继承者 org.eclipse.jdt.internal.compiler.lookup.BlockScope
          继承者 org.eclipse.jdt.internal.compiler.lookup.MethodScope

public class MethodScope
extends BlockScope

Specific block scope used for methods, constructors or clinits, representing its outermost blockscope. Note also that such a scope will be provided to enclose field initializers subscopes as well.


字段摘要
 int analysisIndex
           
 long[] definiteInits
           
 long[][] extraDefiniteInits
           
 SyntheticArgumentBinding[] extraSyntheticArguments
           
 FieldBinding initializedField
           
 boolean insideTypeAnnotation
           
 boolean isConstructorCall
           
 boolean isPropagatingInnerClassEmulation
           
 boolean isStatic
           
 int lastIndex
           
 int lastVisibleFieldID
           
 ReferenceContext referenceContext
           
 
从类 org.eclipse.jdt.internal.compiler.lookup.BlockScope 继承的字段
EmulationPathToImplicitThis, enclosingCase, localIndex, locals, maxOffset, NoEnclosingInstanceInConstructorCall, NoEnclosingInstanceInStaticContext, offset, shiftScopes, startIndex, subscopeCount, subscopes
 
从类 org.eclipse.jdt.internal.compiler.lookup.Scope 继承的字段
AUTOBOX_COMPATIBLE, BLOCK_SCOPE, CLASS_SCOPE, COMPATIBLE, COMPILATION_UNIT_SCOPE, EQUAL_OR_MORE_SPECIFIC, kind, METHOD_SCOPE, MORE_GENERIC, NOT_COMPATIBLE, NOT_RELATED, parent, VARARGS_COMPATIBLE
 
构造方法摘要
MethodScope(ClassScope parent, ReferenceContext context, boolean isStatic)
           
 
方法摘要
 void checkUnusedParameters(MethodBinding method)
           
 void computeLocalVariablePositions(int initOffset, CodeStream codeStream)
          Compute variable positions in scopes given an initial position offset ignoring unused local variables.
 FieldBinding findField(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite, boolean needResolve)
          Overridden to detect the error case inside an explicit constructor call: class X { int i; X myX; X(X x) { this(i, myX.i, x.i); // same for super calls... only the first 2 field accesses are errors } }
 boolean isInsideConstructor()
           
 boolean isInsideInitializer()
           
 boolean isInsideInitializerOrConstructor()
           
 ProblemReporter problemReporter()
          Answer the problem reporter to use for raising new problems.
 int recordInitializationStates(FlowInfo flowInfo)
           
 AbstractMethodDeclaration referenceMethod()
          Answer the reference method of this scope, or null if initialization scope.
 TypeDeclaration referenceType()
          Answer the reference type of this scope.
 
从类 org.eclipse.jdt.internal.compiler.lookup.BlockScope 继承的方法
addAnonymousType, addLocalType, addLocalVariable, addSubscope, allowBlankFinalFieldAssignment, emulateOuterAccess, findLocalType, findLocalVariableDeclarations, findVariable, getBinding, getBinding, getEmulationPath, getEmulationPath, isDuplicateLocalVariable, maxShiftedOffset, needBlankFinalFieldInitializationCheck, propagateInnerEmulation, resetEnclosingMethodStaticFlag, scopeIndex, toString, toString
 
从类 org.eclipse.jdt.internal.compiler.lookup.Scope 继承的方法
boxing, classScope, compareTypes, compilationUnitScope, compilerOptions, computeCompatibleMethod, connectTypeVariables, convertEliminatingTypeVariables, createArrayType, createTypeVariables, deferBoundCheck, enclosingClassScope, enclosingMethodScope, enclosingReceiverType, enclosingReferenceContext, enclosingSourceType, environment, findDefaultAbstractMethod, findDirectMemberType, findExactMethod, findField, findMemberType, findMethod, findMethod, findMethodForArray, findMethodInSuperInterfaces, findType, getBaseType, getBinding, getConstructor, getCurrentPackage, getDeclarationModifiers, getField, getImplicitMethod, getJavaIoSerializable, getJavaLangAnnotationAnnotation, getJavaLangAssertionError, getJavaLangClass, getJavaLangCloneable, getJavaLangEnum, getJavaLangIterable, getJavaLangObject, getJavaLangString, getJavaLangThrowable, getJavaUtilIterator, getMemberType, getMethod, getPackage, getStaticFactory, getType, getType, getType, getTypeOrPackage, greaterLowerBound, greaterLowerBound, hasErasedCandidatesCollisions, innermostSwitchCase, isAcceptableMethod, isBoxingCompatibleWith, isDefinedInField, isDefinedInMethod, isDefinedInSameUnit, isDefinedInType, isInsideCase, isInsideDeprecatedCode, isPossibleSubtypeOfRawType, lowerUpperBound, methodScope, minimalErasedCandidates, mostSpecificClassMethodBinding, mostSpecificInterfaceMethodBinding, mostSpecificMethodBinding, outerMostClassScope, outerMostMethodScope, parameterCompatibilityLevel, referenceCompilationUnit, referenceContext, substitute, substitute, substitute
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

referenceContext

public ReferenceContext referenceContext

isStatic

public boolean isStatic

isConstructorCall

public boolean isConstructorCall

initializedField

public FieldBinding initializedField

lastVisibleFieldID

public int lastVisibleFieldID

analysisIndex

public int analysisIndex

isPropagatingInnerClassEmulation

public boolean isPropagatingInnerClassEmulation

lastIndex

public int lastIndex

definiteInits

public long[] definiteInits

extraDefiniteInits

public long[][] extraDefiniteInits

insideTypeAnnotation

public boolean insideTypeAnnotation

extraSyntheticArguments

public SyntheticArgumentBinding[] extraSyntheticArguments
构造方法详细信息

MethodScope

public MethodScope(ClassScope parent,
                   ReferenceContext context,
                   boolean isStatic)
方法详细信息

checkUnusedParameters

public void checkUnusedParameters(MethodBinding method)

computeLocalVariablePositions

public void computeLocalVariablePositions(int initOffset,
                                          CodeStream codeStream)
Compute variable positions in scopes given an initial position offset ignoring unused local variables. Deal with arguments here, locals and subscopes are processed in BlockScope method


findField

public FieldBinding findField(TypeBinding receiverType,
                              char[] fieldName,
                              InvocationSite invocationSite,
                              boolean needResolve)
Overridden to detect the error case inside an explicit constructor call: class X { int i; X myX; X(X x) { this(i, myX.i, x.i); // same for super calls... only the first 2 field accesses are errors } }

覆盖:
Scope 中的 findField

isInsideConstructor

public boolean isInsideConstructor()

isInsideInitializer

public boolean isInsideInitializer()

isInsideInitializerOrConstructor

public boolean isInsideInitializerOrConstructor()

problemReporter

public ProblemReporter problemReporter()
Answer the problem reporter to use for raising new problems. Note that as a side-effect, this updates the current reference context (unit, type or method) in case the problem handler decides it is necessary to abort.

覆盖:
BlockScope 中的 problemReporter

recordInitializationStates

public final int recordInitializationStates(FlowInfo flowInfo)

referenceMethod

public AbstractMethodDeclaration referenceMethod()
Answer the reference method of this scope, or null if initialization scope.


referenceType

public TypeDeclaration referenceType()
Answer the reference type of this scope. It is the nearest enclosing type of this scope.

覆盖:
BlockScope 中的 referenceType


Copyright © 2013. All Rights Reserved.