recoder.java.declaration
Class ConstructorDeclaration
java.lang.Object
recoder.java.JavaSourceElement
recoder.java.JavaProgramElement
recoder.java.JavaNonTerminalProgramElement
recoder.java.declaration.JavaDeclaration
recoder.java.declaration.MethodDeclaration
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
| 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.bytecode.AccessFlags |
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE |
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
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.