AST
node type ClassDecl

General Info

Production
ClassDecl : ReferenceType ::= Modifiers <ID:String> [SuperClassAccess:Access] Implements:Access* BodyDecl*;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.TypeDecl
              extended by AST.ReferenceType
                  extended by AST.ClassDecl
All Implemented Interfaces:
SimpleSet, VariableScope, java.lang.Cloneable, java.lang.Iterable<ASTNode>, java.util.Iterator
Direct Known Subclasses:
AnonymousDecl, ArrayDecl, ClassDeclSubstituted, EnumDecl, GenericClassDecl, ParClassDecl, UnknownType

Nested classes/interfaces inherited from interface AST.SimpleSet

Description

Source
Declared in Java1.4Frontend/java.ast at line 66

Member Filters

API level:

Aspect:

Constructors

public ClassDecl()
 
public ClassDecl(Modifiers p0,
                 java.lang.String p1,
                 Opt<Access> p2,
                 List<Access> p3,
                 List<BodyDecl> p4)
 
public ClassDecl(Modifiers p0,
                 beaver.Symbol p1,
                 Opt<Access> p2,
                 List<Access> p3,
                 List<BodyDecl> p4)
 

Attributes

Overrides:cast in class TypeDecl
Source
Declared in Java7Frontend/ConstantExpression.jrag at line 160
Aspect
ConstantExpression
syn Constant add(Constant c1,
             Constant c2)
Overrides:add in class TypeDecl
Source
Declared in Java7Frontend/ConstantExpression.jrag at line 226
Aspect
ConstantExpression
Overrides:questionColon in class TypeDecl
Source
Declared in Java7Frontend/ConstantExpression.jrag at line 290
Aspect
ConstantExpression
syn boolean eqIsTrue(Expr left,
                 Expr right)
Overrides:eqIsTrue in class TypeDecl
Source
Declared in Java7Frontend/ConstantExpression.jrag at line 394
Aspect
ConstantExpression
syn int lineNumber()
Overrides:lineNumber in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/ErrorCheck.jrag at line 22
Aspect
ErrorCheck
syn java.util.Collection lookupSuperConstructor()
Overrides:lookupSuperConstructor in class TypeDecl
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 21
Aspect
ConstructScope
syn boolean noConstructor()
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 207
Aspect
ImplicitConstructor
syn SimpleSet interfacesMethodsSignature(java.lang.String signature)
Source
Declared in Java1.4Frontend/LookupMethod.jrag at line 280
Aspect
MemberMethods
syn java.util.HashMap interfacesMethodsSignatureMap()
Source
Declared in Java1.4Frontend/LookupMethod.jrag at line 286
Aspect
MemberMethods
syn java.util.HashMap methodsSignatureMap()
Overrides:methodsSignatureMap in class TypeDecl
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 359
Aspect
MethodSignature15
syn SimpleSet ancestorMethods(java.lang.String signature)
Overrides:ancestorMethods in class TypeDecl
Source
Declared in Java1.4Frontend/LookupMethod.jrag at line 380
Aspect
AncestorMethods
syn SimpleSet memberTypes(java.lang.String name)
Overrides:memberTypes in class TypeDecl
Source
Declared in Java1.4Frontend/LookupType.jrag at line 498
Aspect
TypeScopePropagation
syn java.util.HashMap memberFieldsMap()
Overrides:memberFieldsMap in class TypeDecl
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 283
Aspect
Fields
syn SimpleSet memberFields(java.lang.String name)
Overrides:memberFields in class TypeDecl
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 334
Aspect
Fields
syn java.util.Collection unimplementedMethods()
Overrides:unimplementedMethods in class TypeDecl
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 17
Aspect
Modifiers
syn boolean hasAbstract()
Overrides:hasAbstract in class TypeDecl
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 66
Aspect
Modifiers
syn boolean castingConversionTo(TypeDecl type)
Overrides:castingConversionTo in class TypeDecl
Source
Declared in Java1.5Frontend/AutoBoxing.jrag at line 134
Aspect
AutoBoxing
syn boolean isClassDecl()
Overrides:isClassDecl in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 209
Aspect
TypeAnalysis
syn boolean isString()
Overrides:isString in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 225
Aspect
TypeAnalysis
syn boolean isObject()
Overrides:isObject in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 228
Aspect
TypeAnalysis
syn boolean instanceOf(TypeDecl type)
Overrides:instanceOf in class TypeDecl
Source
Declared in Java1.5Frontend/GenericsSubtype.jrag at line 387
Aspect
GenericsSubtype
syn boolean isSupertypeOfClassDecl(ClassDecl type)
Overrides:isSupertypeOfClassDecl in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 423
Aspect
TypeWideningAndIdentity
Overrides:isSupertypeOfInterfaceDecl in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 440
Aspect
TypeWideningAndIdentity
syn boolean isSupertypeOfArrayDecl(ArrayDecl type)
Overrides:isSupertypeOfArrayDecl in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 453
Aspect
TypeWideningAndIdentity
syn boolean isInnerClass()
Overrides:isInnerClass in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 534
Aspect
NestedTypes
syn boolean isCircular()
Overrides:isCircular in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 677
Aspect
Circularity
syn java.lang.String typeDescriptor()
Overrides:typeDescriptor in class TypeDecl
Source
Declared in Java1.4Backend/ConstantPoolNames.jrag at line 15
Aspect
ConstantPoolNames
syn java.lang.String arrayTypeDescriptor()
Overrides:arrayTypeDescriptor in class TypeDecl
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 820
Aspect
CreateBCode
Overrides:superEnclosing in class TypeDecl
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 430
Aspect
InnerClasses
Overrides:annotation in class TypeDecl
Source
Declared in Java1.5Frontend/Annotations.jrag at line 225
Aspect
Annotations
syn java.util.HashSet implementedInterfaces()
Overrides:implementedInterfaces in class TypeDecl
Source
Declared in Java1.5Frontend/Generics.jrag at line 400
Aspect
GenericsTypeCheck
syn boolean subtype(TypeDecl type)
Overrides:subtype in class TypeDecl
Source
Declared in Java1.5Frontend/GenericsSubtype.jrag at line 407
Aspect
GenericsSubtype
syn boolean supertypeClassDecl(ClassDecl type)
Overrides:supertypeClassDecl in class TypeDecl
Source
Declared in Java1.5Frontend/GenericsSubtype.jrag at line 421
Aspect
GenericsSubtype
Overrides:supertypeInterfaceDecl in class TypeDecl
Source
Declared in Java1.5Frontend/GenericsSubtype.jrag at line 437
Aspect
GenericsSubtype
syn boolean supertypeArrayDecl(ArrayDecl type)
Overrides:supertypeArrayDecl in class TypeDecl
Source
Declared in Java1.5Frontend/GenericsSubtype.jrag at line 450
Aspect
GenericsSubtype
syn SimpleSet bridgeCandidates(java.lang.String signature)
Overrides:bridgeCandidates in class TypeDecl
Source
Declared in Java1.5Backend/GenericsCodegen.jrag at line 227
Aspect
GenericsCodegen
Overrides:needsSignatureAttribute in class TypeDecl
Source
Declared in Java1.5Backend/GenericsCodegen.jrag at line 347
Aspect
GenericsCodegen
syn java.lang.String classSignature()
Overrides:classSignature in class TypeDecl
Source
Declared in Java1.5Backend/GenericsCodegen.jrag at line 385
Aspect
GenericsCodegen

Methods

public void flushCache()
Overrides:flushCache in class ReferenceType
public void flushCollectionCache()
Overrides:flushCollectionCache in class ReferenceType
public ClassDecl clone()
                throws java.lang.CloneNotSupportedException
Overrides:clone in class ReferenceType
Throws:
java.lang.CloneNotSupportedException
public ClassDecl copy()
Overrides:copy in class ASTNode<ASTNode>
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public void accessControl()
Overrides:accessControl in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/AccessControl.jrag at line 147
Aspect
AccessControl
public void exceptionHandling()
Overrides:exceptionHandling in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 106
Aspect
ExceptionHandling
public java.util.Iterator interfacesMethodsIterator()
Source
Declared in Java1.4Frontend/LookupMethod.jrag at line 265
Aspect
MemberMethods
public void checkModifiers()
Overrides:checkModifiers in class TypeDecl
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 96
Aspect
Modifiers
public void toString(java.lang.StringBuffer s)
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 70
Aspect
PrettyPrint
public boolean hasSuperclass()
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 596
Aspect
SuperClasses
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 600
Aspect
SuperClasses
public java.util.Iterator interfacesIterator()
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 615
Aspect
SuperClasses
public void nameCheck()
Overrides:nameCheck in class TypeDecl
Source
Declared in Java1.4Frontend/TypeHierarchyCheck.jrag at line 239
Aspect
TypeHierarchyCheck
public void generateClassfile()
Overrides:generateClassfile in class TypeDecl
Source
Declared in Java1.4Backend/GenerateClassfile.jrag at line 38
Aspect
GenerateClassfile
Overrides:makeGeneric in class TypeDecl
Source
Declared in Java1.5Frontend/Generics.jrag at line 187
Aspect
Generics
Source
Declared in Java1.5Frontend/Generics.jrag at line 1313
Aspect
LookupParTypeDecl
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class ReferenceType
protected int numChildren()
Overrides:numChildren in class ReferenceType
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class ReferenceType
public void setModifiers(Modifiers node)
Replaces the Modifiers child.
Overrides:setModifiers in class ReferenceType
Parameters:
node - The new node to replace the Modifiers child.
Retrieves the Modifiers child.
Overrides:getModifiers in class ReferenceType
Returns:
The current node used as the Modifiers child.
Retrieves the Modifiers child.

This method does not invoke AST transformations.

Overrides:getModifiersNoTransform in class ReferenceType
Returns:
The current node used as the Modifiers child.
public void setID(java.lang.String value)
Replaces the lexeme ID.
Overrides:setID in class ReferenceType
Parameters:
value - The new value for the lexeme ID.
public void setID(beaver.Symbol symbol)
JastAdd-internal setter for lexeme ID using the Beaver parser.
Overrides:setID in class ReferenceType
public java.lang.String getID()
Retrieves the value for the lexeme ID.
Overrides:getID in class ReferenceType
Returns:
The value for the lexeme ID.
public void setSuperClassAccessOpt(Opt<Access> opt)
Replaces the optional node for the SuperClassAccess child. This is the Opt node containing the child SuperClassAccess, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the SuperClassAccess child.
public boolean hasSuperClassAccess()
Check whether the optional SuperClassAccess child exists.
Returns:
true if the optional SuperClassAccess child exists, false if it does not.
Retrieves the (optional) SuperClassAccess child.
Returns:
The SuperClassAccess child, if it exists. Returns null otherwise.
public void setSuperClassAccess(Access node)
Replaces the (optional) SuperClassAccess child.
Parameters:
node - The new node to be used as the SuperClassAccess child.
Retrieves the optional node for child SuperClassAccess. This is the Opt node containing the child SuperClassAccess, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child SuperClassAccess.
public void setImplementsList(List<Access> list)
Replaces the Implements list.
Parameters:
list - The new list node to be used as the Implements list.
public int getNumImplements()
Retrieves the number of children in the Implements list.
Returns:
Number of children in the Implements list.
Retrieves the number of children in the Implements list. Calling this method will not trigger rewrites..
Returns:
Number of children in the Implements list.
public Access getImplements(int i)
Retrieves the element at index i in the Implements list..
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the Implements list.
public void addImplements(Access node)
Append an element to the Implements list.
Parameters:
node - The element to append to the Implements list.
public void addImplementsNoTransform(Access node)
public void setImplements(Access node,
                          int i)
Replaces the Implements list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the Implements list.
Returns:
The node representing the Implements list.
Retrieves the Implements list.

This method does not invoke AST transformations.

Returns:
The node representing the Implements list.
Retrieves the Implements list.
Returns:
The node representing the Implements list.
Retrieves the Implements list.

This method does not invoke AST transformations.

Returns:
The node representing the Implements list.
public void setBodyDeclList(List<BodyDecl> list)
Replaces the BodyDecl list.
Overrides:setBodyDeclList in class ReferenceType
Parameters:
list - The new list node to be used as the BodyDecl list.
public int getNumBodyDecl()
Retrieves the number of children in the BodyDecl list.
Overrides:getNumBodyDecl in class ReferenceType
Returns:
Number of children in the BodyDecl list.
Retrieves the number of children in the BodyDecl list. Calling this method will not trigger rewrites..
Overrides:getNumBodyDeclNoTransform in class ReferenceType
Returns:
Number of children in the BodyDecl list.
public BodyDecl getBodyDecl(int i)
Retrieves the element at index i in the BodyDecl list..
Overrides:getBodyDecl in class ReferenceType
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the BodyDecl list.
public void addBodyDecl(BodyDecl node)
Append an element to the BodyDecl list.
Overrides:addBodyDecl in class ReferenceType
Parameters:
node - The element to append to the BodyDecl list.
public void setBodyDecl(BodyDecl node,
                        int i)
Replaces the BodyDecl list element at index i with the new node node.
Overrides:setBodyDecl in class ReferenceType
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the BodyDecl list.
Overrides:getBodyDecls in class ReferenceType
Returns:
The node representing the BodyDecl list.
Retrieves the BodyDecl list.

This method does not invoke AST transformations.

Overrides:getBodyDeclsNoTransform in class ReferenceType
Returns:
The node representing the BodyDecl list.
Retrieves the BodyDecl list.
Overrides:getBodyDeclList in class ReferenceType
Returns:
The node representing the BodyDecl list.
Retrieves the BodyDecl list.

This method does not invoke AST transformations.

Overrides:getBodyDeclListNoTransform in class ReferenceType
Returns:
The node representing the BodyDecl list.
public boolean Define_boolean_mayBeFinal(ASTNode caller,
                                         ASTNode child)
Overrides:Define_boolean_mayBeFinal in class TypeDecl
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 259
Overrides:Define_NameType_nameType in class TypeDecl
Source
Declared in Java1.4Frontend/SyntacticClassification.jrag at line 74
Overrides:Define_TypeDecl_hostType in class TypeDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 579
public boolean Define_boolean_withinSuppressWarnings(ASTNode caller,
                                                     ASTNode child,
                                                     java.lang.String s)
Overrides:Define_boolean_withinSuppressWarnings in class TypeDecl
Source
Declared in Java1.5Frontend/Annotations.jrag at line 276
Overrides:Define_boolean_withinDeprecatedAnnotation in class TypeDecl
Source
Declared in Java1.5Frontend/Annotations.jrag at line 377
public boolean Define_boolean_inExtendsOrImplements(ASTNode caller,
                                                    ASTNode child)
Overrides:Define_boolean_inExtendsOrImplements in class ASTNode<ASTNode>
Source
Declared in Java1.5Frontend/Generics.jrag at line 269
Overrides:rewriteTo in class ReferenceType

Fields

protected java.util.HashMap interfacesMethodsSignatureMap_value
protected java.util.HashMap methodsSignatureMap_value
protected java.util.Map ancestorMethods_String_values
protected java.util.Map memberTypes_String_values
protected boolean memberFieldsMap_computed
protected java.util.HashMap memberFieldsMap_value
protected java.util.Map memberFields_String_values
protected java.util.Collection unimplementedMethods_value
protected boolean hasAbstract_computed
protected boolean hasAbstract_value
protected java.util.Map castingConversionTo_TypeDecl_values
protected boolean isString_computed
protected boolean isString_value
protected boolean isObject_computed
protected boolean isObject_value
protected java.util.Map instanceOf_TypeDecl_values
protected int isCircular_visited
protected boolean isCircular_computed
protected boolean isCircular_initialized
protected boolean isCircular_value
protected boolean typeDescriptor_computed
protected java.lang.String typeDescriptor_value
protected java.util.HashSet implementedInterfaces_value
protected java.util.Map subtype_TypeDecl_values
protected boolean classSignature_computed
protected java.lang.String classSignature_value

Inherited Members

Attributes inherited from AST.ReferenceType

Attributes inherited from AST.TypeDecl

Attributes inherited from AST.ASTNode

Methods inherited from class AST.ReferenceType

Methods inherited from class AST.TypeDecl

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Methods inherited from interface AST.SimpleSet

Methods inherited from interface AST.VariableScope

Fields inherited from AST.ReferenceType

Fields inherited from AST.TypeDecl

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value

Fields inherited from interface AST.SimpleSet