Klasse TypeDeclaration

Alle implementierten Schnittstellen:
ReferenceContext, TypeConstants, TypeIds, ProblemSeverities
Bekannte direkte Unterklassen:
AspectDeclaration, CodeSnippetTypeDeclaration, CompletionOnAnnotationOfType, IntertypeMemberClassDeclaration

public class TypeDeclaration extends Statement implements ProblemSeverities, ReferenceContext
  • Felddetails

    • CLASS_DECL

      public static final int CLASS_DECL
      Siehe auch:
    • INTERFACE_DECL

      public static final int INTERFACE_DECL
      Siehe auch:
    • ENUM_DECL

      public static final int ENUM_DECL
      Siehe auch:
    • ANNOTATION_TYPE_DECL

      public static final int ANNOTATION_TYPE_DECL
      Siehe auch:
    • RECORD_DECL

      public static final int RECORD_DECL
      Siehe auch:
    • modifiers

      public int modifiers
    • modifiersSourceStart

      public int modifiersSourceStart
    • functionalExpressionsCount

      public int functionalExpressionsCount
    • annotations

      public Annotation[] annotations
    • originalAnnotations

      public Annotation[] originalAnnotations
    • name

      public char[] name
    • superclass

      public TypeReference superclass
    • superInterfaces

      public TypeReference[] superInterfaces
    • fields

      public FieldDeclaration[] fields
    • methods

      public AbstractMethodDeclaration[] methods
    • memberTypes

      public TypeDeclaration[] memberTypes
    • binding

      public SourceTypeBinding binding
    • scope

      public ClassScope scope
    • initializerScope

      public MethodScope initializerScope
    • staticInitializerScope

      public MethodScope staticInitializerScope
    • ignoreFurtherInvestigation

      public boolean ignoreFurtherInvestigation
    • maxFieldCount

      public int maxFieldCount
    • declarationSourceStart

      public int declarationSourceStart
    • declarationSourceEnd

      public int declarationSourceEnd
    • restrictedIdentifierStart

      public int restrictedIdentifierStart
    • bodyStart

      public int bodyStart
    • bodyEnd

      public int bodyEnd
    • compilationResult

      public CompilationResult compilationResult
    • missingAbstractMethods

      public MethodDeclaration[] missingAbstractMethods
    • javadoc

      public Javadoc javadoc
    • allocation

      public QualifiedAllocationExpression allocation
    • enclosingType

      public TypeDeclaration enclosingType
    • enumValuesSyntheticfield

      public FieldBinding enumValuesSyntheticfield
    • enumConstantsCounter

      public int enumConstantsCounter
    • typeParameters

      public TypeParameter[] typeParameters
    • recordComponents

      public RecordComponent[] recordComponents
    • nRecordComponents

      public int nRecordComponents
    • disallowedComponentNames

      public static Set<String> disallowedComponentNames
    • permittedTypes

      public TypeReference[] permittedTypes
  • Konstruktordetails

  • Methodendetails

    • abort

      public void abort(int abortLevel, CategorizedProblem problem)
      Angegeben von:
      abort in Schnittstelle ReferenceContext
    • addClinit

      public final void addClinit()
      This method is responsible for adding a method declaration to the type method collections. Note that this implementation is inserting it in first place (as VAJ or javac), and that this impacts the behavior of the method ConstantPool.resetForClinit(int. int), in so far as the latter will have to reset the constant pool state accordingly (if it was added first, it does not need to preserve some of the method specific cached entries since this will be the first method). inserts the clinit method declaration in the first position.
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.codegen.ConstantPool#resetForClinit(int, int)
    • addMissingAbstractMethodFor

      public MethodDeclaration addMissingAbstractMethodFor(MethodBinding methodBinding)
    • analyseCode

      public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
      Flow analysis for a local innertype
      Angegeben von:
      analyseCode in Klasse Statement
    • analyseCode

      public void analyseCode(ClassScope enclosingClassScope)
      Flow analysis for a member innertype
    • analyseCode

      public void analyseCode(ClassScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
      Flow analysis for a local member innertype
    • analyseCode

      public void analyseCode(CompilationUnitScope unitScope)
      Flow analysis for a package member type
    • checkConstructors

      public boolean checkConstructors(Parser parser)
      Check for constructor vs. method with no return type. Answers true if at least one constructor is defined
    • compilationResult

      public CompilationResult compilationResult()
      Angegeben von:
      compilationResult in Schnittstelle ReferenceContext
    • createDefaultConstructorForRecord

      public ConstructorDeclaration createDefaultConstructorForRecord(boolean needExplicitConstructorCall, boolean needToInsert)
    • createDefaultConstructor

      public ConstructorDeclaration createDefaultConstructor(boolean needExplicitConstructorCall, boolean needToInsert)
    • createDefaultConstructorWithBinding

      public MethodBinding createDefaultConstructorWithBinding(MethodBinding inheritedConstructorBinding, boolean eraseThrownExceptions)
    • declarationOf

      public FieldDeclaration declarationOf(FieldBinding fieldBinding)
      Find the matching parse node, answers null if nothing found
    • declarationOf

      public TypeDeclaration declarationOf(MemberTypeBinding memberTypeBinding)
      Find the matching parse node, answers null if nothing found
    • declarationOf

      public AbstractMethodDeclaration declarationOf(MethodBinding methodBinding)
      Find the matching parse node, answers null if nothing found
    • declarationOf

      public RecordComponent declarationOf(RecordComponentBinding recordComponentBinding)
      Find the matching parse node, answers null if nothing found
    • declarationOfType

      public TypeDeclaration declarationOfType(char[][] typeName)
      Finds the matching type amoung this type's member types. Returns null if no type with this name is found. The type name is a compound name relative to this type e.g. if this type is X and we're looking for Y.X.A.B then a type name would be {X, A, B}
    • getCompilationUnitDeclaration

      public CompilationUnitDeclaration getCompilationUnitDeclaration()
      Angegeben von:
      getCompilationUnitDeclaration in Schnittstelle ReferenceContext
    • getConstructor

      public ConstructorDeclaration getConstructor(Parser parser)
      This is applicable only for records - ideally get the canonical constructor, if not get a constructor and at the client side tentatively marked as canonical constructor which gets checked at the binding time. If there are no constructors, then null is returned.
    • generateCode

      public void generateCode(ClassFile enclosingClassFile)
      Generic bytecode generation for type
    • generateAttributes

      protected void generateAttributes(ClassFile classFile)
    • rememberAnnotations

      public void rememberAnnotations()
    • generateCode

      public void generateCode(BlockScope blockScope, CodeStream codeStream)
      Bytecode generation for a local inner type (API as a normal statement code gen)
      Angegeben von:
      generateCode in Klasse Statement
    • generateCode

      public void generateCode(ClassScope classScope, ClassFile enclosingClassFile)
      Bytecode generation for a member inner type
    • generateCode

      public void generateCode(CompilationUnitScope unitScope)
      Bytecode generation for a package member
    • hasErrors

      public boolean hasErrors()
      Angegeben von:
      hasErrors in Schnittstelle ReferenceContext
    • kind

      public static final int kind(int flags)
    • isRecord

      public boolean isRecord()
    • manageEnclosingInstanceAccessIfNecessary

      public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo)
    • manageEnclosingInstanceAccessIfNecessary

      public void manageEnclosingInstanceAccessIfNecessary(ClassScope currentScope, FlowInfo flowInfo)
      Access emulation for a local member type force to emulation of access to direct enclosing instance. By using the initializer scope, we actually only request an argument emulation, the field is not added until actually used. However we will force allocations to be qualified with an enclosing instance. Local member cannot be static.
    • needClassInitMethod

      public boolean needClassInitMethod()
      A will be requested as soon as static fields or assertions are present. It will be eliminated during classfile creation if no bytecode was actually produced based on some optimizations/compiler settings.
    • parseMethods

      public void parseMethods(Parser parser, CompilationUnitDeclaration unit)
    • print

      public StringBuffer print(int indent, StringBuffer output)
      Setzt außer Kraft:
      print in Klasse Statement
    • printBody

      public StringBuffer printBody(int indent, StringBuffer output)
    • printHeader

      public StringBuffer printHeader(int indent, StringBuffer output)
    • printStatement

      public StringBuffer printStatement(int tab, StringBuffer output)
      Angegeben von:
      printStatement in Klasse Statement
    • record

      public int record(FunctionalExpression expression)
    • resolve

      public void resolve()
    • resolve

      public void resolve(BlockScope blockScope)
      Resolve a local type declaration
      Angegeben von:
      resolve in Klasse Statement
    • resolve

      public void resolve(ClassScope upperScope)
      Resolve a member type declaration (can be a local member)
    • resolve

      public void resolve(CompilationUnitScope upperScope)
      Resolve a top level type declaration
    • tagAsHavingErrors

      public void tagAsHavingErrors()
      Angegeben von:
      tagAsHavingErrors in Schnittstelle ReferenceContext
    • tagAsHavingIgnoredMandatoryErrors

      public void tagAsHavingIgnoredMandatoryErrors(int problemId)
      Angegeben von:
      tagAsHavingIgnoredMandatoryErrors in Schnittstelle ReferenceContext
    • traverse

      public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope)
      Iteration for a package member type
    • traverse

      public void traverse(ASTVisitor visitor, BlockScope blockScope)
      Iteration for a local inner type
      Setzt außer Kraft:
      traverse in Klasse ASTNode
    • traverse

      public void traverse(ASTVisitor visitor, ClassScope classScope)
      Iteration for a member innertype
    • isPackageInfo

      public boolean isPackageInfo()
    • isSecondary

      public boolean isSecondary()
      Returns whether the type is a secondary one or not.
    • updateSupertypesWithAnnotations

      public void updateSupertypesWithAnnotations(Map<ReferenceBinding,ReferenceBinding> outerUpdates)
    • updateWithAnnotations

      protected ReferenceBinding updateWithAnnotations(TypeReference typeRef, ReferenceBinding previousType, Map<ReferenceBinding,ReferenceBinding> outerUpdates, Map<ReferenceBinding,ReferenceBinding> updates)
    • alternativeName

      public char[] alternativeName()
    • getLocalTypeNameSuffix

      public char[] getLocalTypeNameSuffix()