RECODER 0.92

recoder.java.declaration
Class ConstructorDeclaration

java.lang.Object
  extended by recoder.java.JavaSourceElement
      extended by recoder.java.JavaProgramElement
          extended by recoder.java.JavaNonTerminalProgramElement
              extended by recoder.java.declaration.JavaDeclaration
                  extended by recoder.java.declaration.MethodDeclaration
                      extended by recoder.java.declaration.ConstructorDeclaration
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ClassTypeContainer, Constructor, Member, Method, ProgramModelElement, AccessFlags, Declaration, MemberDeclaration, TypeDeclarationContainer, NamedProgramElement, NonTerminalProgramElement, ParameterContainer, ProgramElement, TypeReferenceContainer, ScopeDefiningElement, SourceElement, StatementContainer, TypeScope, VariableScope, ModelElement, NamedModelElement

public class ConstructorDeclaration
extends MethodDeclaration
implements Constructor

The getTypeReference method returns null - constructors do not have explicit return types. A constructor declaration contains its own name even though it must match the class name: the name occurs as syntactical element and hence must be represented.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Field Summary
 
Fields inherited from class recoder.java.JavaSourceElement
factory
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Constructor Summary
  ConstructorDeclaration()
          Constructor declaration.
protected ConstructorDeclaration(ConstructorDeclaration proto)
          Constructor declaration.
  ConstructorDeclaration(VisibilityModifier modifier, Identifier name, ASTList<ParameterDeclaration> parameters, Throws exceptions, StatementBlock body)
          Constructor declaration.
 
Method Summary
 void accept(SourceVisitor v)
          Receive a visitor, for instance a pretty printer.
 ConstructorDeclaration deepClone()
          Deep clone.
 boolean isAbstract()
          Constructors are never abstract.
 boolean isFinal()
          Constructors are never final.
 boolean isNative()
          Constructors are never native.
 boolean isStatic()
          Constructors are never static.
 boolean isStrictFp()
          Constructors are never strictfp.
 boolean isSynchronized()
          Constructors are never synchronized.
 
Methods inherited from class recoder.java.declaration.MethodDeclaration
addTypeToScope, addVariableToScope, getASTParent, getBinaryName, getBody, getChildAt, getChildCount, getChildPositionCode, getContainer, getContainingClassType, getExceptions, getFirstElement, getFullName, getIdentifier, getLastElement, getMemberParent, getName, getPackage, getParameterDeclarationAt, getParameterDeclarationCount, getParameters, getProgramModelInfo, getReturnType, getSignature, getStatementAt, getStatementCount, getThrown, getTypeDeclarationAt, getTypeDeclarationCount, getTypeInScope, getTypeParameters, getTypeReference, getTypeReferenceAt, getTypeReferenceCount, getTypes, getTypesInScope, getVariableInScope, getVariablesInScope, isDefinedScope, isPrivate, isProtected, isPublic, isVarArgMethod, makeParentRoleValid, removeTypeFromScope, removeVariableFromScope, replaceChild, setBody, setDefinedScope, setIdentifier, setMemberParent, setParameters, setProgramModelInfo, setThrown, setTypeParameters, setTypeReference, toString
 
Methods inherited from class recoder.java.declaration.JavaDeclaration
getAnnotations, getDeclarationSpecifiers, getModifiers, getVisibilityModifier, isTransient, isVolatile, setDeclarationSpecifiers
 
Methods inherited from class recoder.java.JavaNonTerminalProgramElement
getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
 
Methods inherited from class recoder.java.JavaProgramElement
getComments, getID, setComments, validate
 
Methods inherited from class recoder.java.JavaSourceElement
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface recoder.abstraction.Method
getExceptions, getReturnType, getSignature, getTypeParameters, isVarArgMethod
 
Methods inherited from interface recoder.abstraction.Member
getAnnotations, getContainingClassType, isPrivate, isProtected, isPublic
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getBinaryName, getFullName, getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
Methods inherited from interface recoder.abstraction.ClassTypeContainer
getContainer, getPackage, getTypes
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getBinaryName, getFullName, getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
Methods inherited from interface recoder.java.Declaration
getDeclarationSpecifiers, setDeclarationSpecifiers
 

Constructor Detail

ConstructorDeclaration

public ConstructorDeclaration()
Constructor declaration.


ConstructorDeclaration

public ConstructorDeclaration(VisibilityModifier modifier,
                              Identifier name,
                              ASTList<ParameterDeclaration> parameters,
                              Throws exceptions,
                              StatementBlock body)
Constructor declaration.

Parameters:
modifier - a visibility modifier.
name - an identifier.
parameters - a parameter declaration mutable list.
exceptions - a throws.
body - a statement block.

ConstructorDeclaration

protected ConstructorDeclaration(ConstructorDeclaration proto)
Constructor declaration.

Parameters:
proto - a constructor declaration.
Method Detail

deepClone

public ConstructorDeclaration deepClone()
Deep clone.

Specified by:
deepClone in interface SourceElement
Overrides:
deepClone in class MethodDeclaration
Returns:
the object.

isAbstract

public boolean isAbstract()
Constructors are never abstract.

Specified by:
isAbstract in interface Method
Overrides:
isAbstract in class MethodDeclaration
Returns:
true if this member is abstract, false otherwise.
See Also:
Constructor

isFinal

public boolean isFinal()
Constructors are never final.

Specified by:
isFinal in interface Member
Overrides:
isFinal in class MethodDeclaration
Returns:
true if this member is final, false otherwise.

isNative

public boolean isNative()
Constructors are never native.

Specified by:
isNative in interface Method
Overrides:
isNative in class MethodDeclaration
Returns:
true if this method is native, false otherwise.
See Also:
Constructor

isStatic

public boolean isStatic()
Constructors are never static.

Specified by:
isStatic in interface Member
Specified by:
isStatic in interface MemberDeclaration
Overrides:
isStatic in class MethodDeclaration
Returns:
true if this member is static, false otherwise.

isStrictFp

public boolean isStrictFp()
Constructors are never strictfp.

Specified by:
isStrictFp in interface Member
Specified by:
isStrictFp in interface MemberDeclaration
Overrides:
isStrictFp in class MethodDeclaration
Returns:
true if this member is strictfp, false otherwise.

isSynchronized

public boolean isSynchronized()
Constructors are never synchronized.

Specified by:
isSynchronized in interface Method
Overrides:
isSynchronized in class MethodDeclaration
Returns:
true if this method is synchronized, false otherwise.
See Also:
Constructor

accept

public void accept(SourceVisitor v)
Description copied from interface: SourceElement
Receive a visitor, for instance a pretty printer.

Specified by:
accept in interface SourceElement
Overrides:
accept in class MethodDeclaration
Parameters:
v - a source visitor.

RECODER 0.92