AST
node type ConstructorDecl

General Info

Production
ConstructorDecl : BodyDecl ::= Modifiers <ID:String> Parameter:ParameterDeclaration* Exception:Access* [ConstructorInvocation:Stmt] Block;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.BodyDecl
              extended by AST.ConstructorDecl
All Implemented Interfaces:
ExceptionHolder, java.lang.Cloneable, java.lang.Iterable<ASTNode>
Direct Known Subclasses:
ConstructorDeclSubstituted, GenericConstructorDecl, ParConstructorDecl

Description

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

Member Filters

API level:

Aspect:

Constructors

 
public ConstructorDecl(Modifiers p0,
                       java.lang.String p1,
                       List<ParameterDeclaration> p2,
                       List<Access> p3,
                       Opt<Stmt> p4,
                       Block p5)
 
public ConstructorDecl(Modifiers p0,
                       beaver.Symbol p1,
                       List<ParameterDeclaration> p2,
                       List<Access> p3,
                       Opt<Stmt> p4,
                       Block p5)
 

Attributes

syn boolean accessibleFrom(TypeDecl type)
Source
Declared in Java1.4Frontend/AccessControl.jrag at line 94
Aspect
AccessControl
syn boolean isDAafter(Variable v)
Overrides:isDAafter in class BodyDecl
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 295
Aspect
DA
syn boolean isDUafter(Variable v)
Overrides:isDUafter in class BodyDecl
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 752
Aspect
DU
syn boolean throwsException(TypeDecl exceptionType)
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 159
Aspect
ExceptionHandling
syn java.lang.String name()
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 110
Aspect
ConstructorDecl
syn java.lang.String signature()
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 112
Aspect
ConstructorDecl
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 125
Aspect
ConstructorDecl
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 168
Aspect
MethodSignature15
syn boolean isDefaultConstructor()
Returns:
true if this is an auto-generated default constructor
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 182
Aspect
ImplicitConstructor
syn SimpleSet parameterDeclaration(java.lang.String name)
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 105
Aspect
VariableScope
syn boolean isSynthetic()
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 217
Aspect
Modifiers
syn boolean isPublic()
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 235
Aspect
Modifiers
syn boolean isPrivate()
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 236
Aspect
Modifiers
syn boolean isProtected()
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 237
Aspect
Modifiers
Source
Declared in Java1.4Frontend/NameCheck.jrag at line 88
Aspect
NameCheck
syn TypeDecl type()
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 268
Aspect
TypeAnalysis
syn boolean isVoid()
Overrides:isVoid in class BodyDecl
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 271
Aspect
TypeAnalysis
syn java.util.Collection attributes()
Overrides:attributes in class BodyDecl
Source
Declared in Java1.5Backend/AnnotationsCodegen.jrag at line 31
Aspect
AnnotationsCodegen
syn java.lang.String descName()
Source
Declared in Java1.4Backend/ConstantPoolNames.jrag at line 48
Aspect
ConstantPoolNames
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 100
Aspect
CreateBCode
syn int flags()
Source
Declared in Java1.5Backend/VariableArityParametersCodegen.jrag at line 94
Aspect
VariableArityParametersCodegen
syn boolean isBytecodeMethod()
Overrides:isBytecodeMethod in class BodyDecl
Source
Declared in Java1.4Backend/GenerateClassfile.jrag at line 296
Aspect
GenerateClassfile
syn boolean flush()
Overrides:flush in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/GenerateClassfile.jrag at line 325
Aspect
GenerateClassfile
syn boolean needsEnclosing()
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 433
Aspect
InnerClasses
syn boolean needsSuperEnclosing()
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 434
Aspect
InnerClasses
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 436
Aspect
InnerClasses
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 437
Aspect
InnerClasses
Source
Declared in Java1.4Backend/LocalNum.jrag at line 55
Aspect
LocalNum
Source
Declared in Java1.4Backend/LocalNum.jrag at line 64
Aspect
LocalNum
Source
Declared in Java1.4Backend/LocalNum.jrag at line 75
Aspect
LocalNum
syn boolean hasAnnotationSuppressWarnings(java.lang.String s)
Overrides:hasAnnotationSuppressWarnings in class BodyDecl
Source
Declared in Java1.5Frontend/Annotations.jrag at line 283
Aspect
Annotations
syn boolean isDeprecated()
Overrides:isDeprecated in class BodyDecl
Source
Declared in Java1.5Frontend/Annotations.jrag at line 324
Aspect
Annotations
Source
Declared in Java1.5Frontend/Generics.jrag at line 1515
Aspect
SourceDeclarations
syn boolean applicableBySubtyping(List argList)
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 190
Aspect
MethodSignature15
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 210
Aspect
MethodSignature15
syn boolean applicableVariableArity(List argList)
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 231
Aspect
MethodSignature15
syn boolean potentiallyApplicable(List argList)
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 318
Aspect
MethodSignature15
syn int arity()
Source
Declared in Java1.5Frontend/MethodSignature.jrag at line 325
Aspect
MethodSignature15
syn boolean isVariableArity()
Source
Declared in Java1.5Frontend/VariableArityParameters.jrag at line 34
Aspect
VariableArityParameters
Source
Declared in Java1.5Frontend/VariableArityParameters.jrag at line 63
Aspect
VariableArityParameters
Source
Declared in Java1.5Backend/GenericsCodegen.jrag at line 168
Aspect
GenericsCodegen
Overrides:needsSignatureAttribute in class BodyDecl
Source
Declared in Java1.5Backend/GenericsCodegen.jrag at line 373
Aspect
GenericsCodegen
Overrides:hasAnnotationSafeVarargs in class BodyDecl
Returns:
true if the modifier list includes the SafeVarargs annotation
Source
Declared in Java7Frontend/SafeVarargs.jrag at line 20
Aspect
SafeVarargs
It is an error if the SafeVarargs annotation is used on something that is not a variable arity method or constructor.
Overrides:hasIllegalAnnotationSafeVarargs in class BodyDecl
Source
Declared in Java7Frontend/SafeVarargs.jrag at line 56
Aspect
SafeVarargs
inh boolean handlesException(TypeDecl exceptionType)
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 50
Aspect
ExceptionHandling
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 267
Aspect
TypeAnalysis

Methods

public void flushCache()
Overrides:flushCache in class BodyDecl
public void flushCollectionCache()
Overrides:flushCollectionCache in class BodyDecl
public ConstructorDecl clone()
                      throws java.lang.CloneNotSupportedException
Overrides:clone in class BodyDecl
Throws:
java.lang.CloneNotSupportedException
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 boolean applicable(List argList)
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 144
Aspect
ConstructorDecl
public void setDefaultConstructor()
Set the default constructor flag. Causes this constructor to not be pretty printed.
Source
Declared in Java1.4Frontend/LookupConstructor.jrag at line 176
Aspect
ImplicitConstructor
public void checkModifiers()
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 110
Aspect
Modifiers
public void nameCheck()
Overrides:nameCheck in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/NameCheck.jrag at line 73
Aspect
NameCheck
public void toString(java.lang.StringBuffer s)
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 119
Aspect
PrettyPrint
public void typeCheck()
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeCheck.jrag at line 424
Aspect
TypeCheck
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 912
Aspect
CodeGeneration
public void createBCode(CodeGeneration gen)
Overrides:createBCode in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 137
Aspect
CreateBCode
public void generateMethod(java.io.DataOutputStream out,
                           ConstantPool cp)
                    throws java.io.IOException
Overrides:generateMethod in class BodyDecl
Throws:
java.io.IOException
Source
Declared in Java1.4Backend/GenerateClassfile.jrag at line 252
Aspect
GenerateClassfile
public void touchMethod(ConstantPool cp)
Overrides:touchMethod in class BodyDecl
Source
Declared in Java1.4Backend/GenerateClassfile.jrag at line 268
Aspect
GenerateClassfile
public boolean clear()
Overrides:clear in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/GenerateClassfile.jrag at line 376
Aspect
GenerateClassfile
public void addEnclosingVariables()
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 458
Aspect
InnerClasses
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 492
Aspect
InnerClasses
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 536
Aspect
InnerClasses
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 544
Aspect
InnerClasses
public void transformation()
Overrides:transformation in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/Transformations.jrag at line 119
Aspect
Transformations
protected void transformEnumConstructors()
Overrides:transformEnumConstructors in class ASTNode<ASTNode>
Source
Declared in Java1.5Frontend/Enums.jrag at line 138
Aspect
Enums
Overrides:substitutedBodyDecl in class BodyDecl
Source
Declared in Java1.5Frontend/Generics.jrag at line 1283
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 BodyDecl
protected int numChildren()
Overrides:numChildren in class BodyDecl
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class BodyDecl
public void setModifiers(Modifiers node)
Replaces the Modifiers child.
Parameters:
node - The new node to replace the Modifiers child.
Retrieves the Modifiers child.
Returns:
The current node used as the Modifiers child.
Retrieves the Modifiers child.

This method does not invoke AST transformations.

Returns:
The current node used as the Modifiers child.
public void setID(java.lang.String value)
Replaces the lexeme ID.
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.
public java.lang.String getID()
Retrieves the value for the lexeme ID.
Returns:
The value for the lexeme ID.
Replaces the Parameter list.
Parameters:
list - The new list node to be used as the Parameter list.
public int getNumParameter()
Retrieves the number of children in the Parameter list.
Returns:
Number of children in the Parameter list.
Retrieves the number of children in the Parameter list. Calling this method will not trigger rewrites..
Returns:
Number of children in the Parameter list.
Retrieves the element at index i in the Parameter list..
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the Parameter list.
Append an element to the Parameter list.
Parameters:
node - The element to append to the Parameter list.
public void setParameter(ParameterDeclaration node,
                         int i)
Replaces the Parameter 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 Parameter list.
Returns:
The node representing the Parameter list.
Retrieves the Parameter list.

This method does not invoke AST transformations.

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

This method does not invoke AST transformations.

Returns:
The node representing the Parameter list.
public void setExceptionList(List<Access> list)
Replaces the Exception list.
Parameters:
list - The new list node to be used as the Exception list.
public int getNumException()
Retrieves the number of children in the Exception list.
Specified by:getNumException in interface ExceptionHolder
Returns:
Number of children in the Exception list.
Retrieves the number of children in the Exception list. Calling this method will not trigger rewrites..
Returns:
Number of children in the Exception list.
public Access getException(int i)
Retrieves the element at index i in the Exception list..
Specified by:getException in interface ExceptionHolder
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the Exception list.
public void addException(Access node)
Append an element to the Exception list.
Parameters:
node - The element to append to the Exception list.
public void addExceptionNoTransform(Access node)
public void setException(Access node,
                         int i)
Replaces the Exception 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 Exception list.
Returns:
The node representing the Exception list.
Retrieves the Exception list.

This method does not invoke AST transformations.

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

This method does not invoke AST transformations.

Returns:
The node representing the Exception list.
Replaces the optional node for the ConstructorInvocation child. This is the Opt node containing the child ConstructorInvocation, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the ConstructorInvocation child.
public boolean hasConstructorInvocation()
Check whether the optional ConstructorInvocation child exists.
Returns:
true if the optional ConstructorInvocation child exists, false if it does not.
Retrieves the (optional) ConstructorInvocation child.
Returns:
The ConstructorInvocation child, if it exists. Returns null otherwise.
public void setConstructorInvocation(Stmt node)
Replaces the (optional) ConstructorInvocation child.
Parameters:
node - The new node to be used as the ConstructorInvocation child.
Retrieves the optional node for child ConstructorInvocation. This is the Opt node containing the child ConstructorInvocation, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child ConstructorInvocation.
public void setBlock(Block node)
Replaces the Block child.
Parameters:
node - The new node to replace the Block child.
public Block getBlock()
Retrieves the Block child.
Returns:
The current node used as the Block child.
Retrieves the Block child.

This method does not invoke AST transformations.

Returns:
The current node used as the Block child.
public boolean Define_boolean_isDAbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDAbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 298
public boolean Define_boolean_isDUbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDUbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 755
public boolean Define_boolean_handlesException(ASTNode caller,
                                               ASTNode child,
                                               TypeDecl exceptionType)
Overrides:Define_boolean_handlesException in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 156
public java.util.Collection Define_Collection_lookupMethod(ASTNode caller,
                                                           ASTNode child,
                                                           java.lang.String name)
Overrides:Define_Collection_lookupMethod in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/LookupMethod.jrag at line 45
public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller,
                                                 ASTNode child,
                                                 java.lang.String name)
Overrides:Define_SimpleSet_lookupVariable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/LookupVariable.jrag at line 64
public boolean Define_boolean_mayBePublic(ASTNode caller,
                                          ASTNode child)
Overrides:Define_boolean_mayBePublic in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 282
public boolean Define_boolean_mayBeProtected(ASTNode caller,
                                             ASTNode child)
Overrides:Define_boolean_mayBeProtected in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 283
public boolean Define_boolean_mayBePrivate(ASTNode caller,
                                           ASTNode child)
Overrides:Define_boolean_mayBePrivate in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 284
Overrides:Define_ASTNode_enclosingBlock in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/NameCheck.jrag at line 247
Overrides:Define_NameType_nameType in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/SyntacticClassification.jrag at line 117
Overrides:Define_TypeDecl_enclosingInstance in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeCheck.jrag at line 517
Overrides:Define_boolean_inExplicitConstructorInvocation in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeHierarchyCheck.jrag at line 132
public boolean Define_boolean_inStaticContext(ASTNode caller,
                                              ASTNode child)
Overrides:Define_boolean_inStaticContext in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeHierarchyCheck.jrag at line 144
public boolean Define_boolean_reachable(ASTNode caller,
                                        ASTNode child)
Overrides:Define_boolean_reachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 32
public boolean Define_boolean_isMethodParameter(ASTNode caller,
                                                ASTNode child)
Overrides:Define_boolean_isMethodParameter in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/VariableDeclaration.jrag at line 58
public boolean Define_boolean_isConstructorParameter(ASTNode caller,
                                                     ASTNode child)
Overrides:Define_boolean_isConstructorParameter in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/VariableDeclaration.jrag at line 59
Overrides:Define_boolean_isExceptionHandlerParameter in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/VariableDeclaration.jrag at line 60
public int Define_int_localNum(ASTNode caller,
                               ASTNode child)
Overrides:Define_int_localNum in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/LocalNum.jrag at line 90
public boolean Define_boolean_mayUseAnnotationTarget(ASTNode caller,
                                                     ASTNode child,
                                                     java.lang.String name)
Overrides:Define_boolean_mayUseAnnotationTarget in class ASTNode<ASTNode>
Source
Declared in Java1.5Frontend/Annotations.jrag at line 89
public boolean Define_boolean_variableArityValid(ASTNode caller,
                                                 ASTNode child)
Overrides:Define_boolean_variableArityValid in class ASTNode<ASTNode>
Source
Declared in Java1.5Frontend/VariableArityParameters.jrag at line 21
public boolean Define_boolean_inhModifiedInScope(ASTNode caller,
                                                 ASTNode child,
                                                 Variable var)
Overrides:Define_boolean_inhModifiedInScope in class ASTNode<ASTNode>
Source
Declared in Java7Frontend/PreciseRethrow.jrag at line 48
public boolean Define_boolean_isCatchParam(ASTNode caller,
                                           ASTNode child)
Overrides:Define_boolean_isCatchParam in class ASTNode<ASTNode>
Source
Declared in Java7Frontend/PreciseRethrow.jrag at line 123
Overrides:rewriteTo in class BodyDecl

Fields

protected boolean addEnclosingVariables
Source
Declared in Java1.4Backend/InnerClasses.jrag at line 457
Aspect
InnerClasses
protected java.lang.String tokenString_ID
public int IDstart
public int IDend
protected java.util.Map accessibleFrom_TypeDecl_values
protected java.util.Map isDAafter_Variable_values
protected java.util.Map isDUafter_Variable_values
protected java.util.Map throwsException_TypeDecl_values
protected boolean name_computed
protected java.lang.String name_value
protected boolean signature_computed
protected java.lang.String signature_value
protected java.util.Map sameSignature_ConstructorDecl_values
protected java.util.Map parameterDeclaration_String_values
protected boolean attributes_computed
protected java.util.Collection attributes_value
protected boolean descName_computed
protected java.lang.String descName_value
protected java.util.Map bytecodes_ConstantPool_values
protected boolean flags_computed
protected int flags_value
protected java.util.Map handlesException_TypeDecl_values

Inherited Members

Attributes inherited from AST.BodyDecl

Attributes inherited from AST.ASTNode

Methods inherited from class AST.BodyDecl

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

Fields inherited from AST.BodyDecl

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value