xjavadoc
Class ConstructorImpl

java.lang.Object
  extended byxjavadoc.AbstractProgramElement
      extended byxjavadoc.MemberImpl
          extended byxjavadoc.AbstractExecutableMember
              extended byxjavadoc.ConstructorImpl
All Implemented Interfaces:
java.lang.Comparable, Named, XConstructor, XExecutableMember, XMember, XProgramElement

final class ConstructorImpl
extends AbstractExecutableMember
implements XConstructor

Describe what this class does

Author:
Aslak Hellesøy

Field Summary
static int instanceCount
           
 
Fields inherited from class xjavadoc.AbstractProgramElement
EMPTY_LIST
 
Constructor Summary
ConstructorImpl(AbstractClass containingClass, XTagFactory tagFactory)
           
 
Method Summary
 void addParameterData(java.lang.String type, java.lang.String name, int dimension)
          Adds a parameter
 void addThrownException(java.lang.String thrownException)
           
protected  java.lang.String buildStringId()
           
 boolean equals(java.lang.Object o)
           
 java.util.List getAllSuperElements()
           
 java.lang.String getName()
          Get name
 java.lang.String getNameWithSignature()
          Deprecated. use getSignature(boolean)
 java.lang.String getNameWithSignature(boolean withParam)
          Gets the name and signature
(package private)  int getParameterDimension(int index)
           
(package private)  java.lang.String getParameterName(int index)
           
 java.util.List getParameters()
          Returns the method parameters.
(package private)  java.lang.String getParameterType(int index)
           
 java.lang.String getParameterTypes()
          Returns the parameters as a comma separated list of classes.
 java.lang.String getSignature()
          Returns the signature.
 java.lang.String getSignature(boolean withParam)
          Gets the signature
 XProgramElement getSuperElement()
           
 XProgramElement getSuperElement(boolean forMethod)
           
 java.util.List getSuperInterfaceElements()
           
 java.util.List getThrownExceptions()
          Returns the thrown exception classes.
 int hashCode()
           
 boolean isConstructor()
          Return true if this is a constructor.
 boolean isNative()
          Gets the Native attribute of the AbstractExecutableMember object
 boolean isSynchronized()
          Gets the Synchronized attribute of the AbstractExecutableMember object
 void setName(java.lang.String name)
           
 boolean throwsException(java.lang.String exception_class_name)
          Return true if the member throws the specified exception in its throws block.
 java.lang.String toString()
           
 
Methods inherited from class xjavadoc.AbstractProgramElement
addModifier, compareTo, getContainingAbstractClass, getContainingClass, getContainingPackage, getDoc, getModifiers, getModifierSpecifier, getTagFactory, getXJavaDoc, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, reset, setToken, updateDoc
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface xjavadoc.XExecutableMember
getNameWithSignature, getNameWithSignature, getParameters, getParameterTypes, getSignature, getSignature, getThrownExceptions, isNative, isSynchronized, throwsException
 
Methods inherited from interface xjavadoc.XProgramElement
getContainingClass, getContainingPackage, getDoc, getModifiers, getModifierSpecifier, getSuperInterfaceElements, getXJavaDoc, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, updateDoc
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

instanceCount

public static int instanceCount
Constructor Detail

ConstructorImpl

public ConstructorImpl(AbstractClass containingClass,
                       XTagFactory tagFactory)
Method Detail

isConstructor

public final boolean isConstructor()
Description copied from interface: XExecutableMember
Return true if this is a constructor.

Specified by:
isConstructor in interface XExecutableMember
Returns:
true if this is a constructor.

getSuperElement

public XProgramElement getSuperElement()
Specified by:
getSuperElement in interface XProgramElement

getAllSuperElements

public java.util.List getAllSuperElements()

getName

public java.lang.String getName()
Description copied from interface: Named
Get name

Specified by:
getName in interface Named
Overrides:
getName in class MemberImpl

setName

public final void setName(java.lang.String name)
Overrides:
setName in class MemberImpl

buildStringId

protected java.lang.String buildStringId()
Specified by:
buildStringId in class AbstractExecutableMember

isNative

public final boolean isNative()
Gets the Native attribute of the AbstractExecutableMember object

Specified by:
isNative in interface XExecutableMember
Returns:
The Native value

isSynchronized

public final boolean isSynchronized()
Gets the Synchronized attribute of the AbstractExecutableMember object

Specified by:
isSynchronized in interface XExecutableMember
Returns:
The Synchronized value

getParameters

public final java.util.List getParameters()
Returns the method parameters.

Specified by:
getParameters in interface XExecutableMember
Returns:
the method parameters

getSignature

public final java.lang.String getSignature()
Deprecated. use getSignature(boolean)

Description copied from interface: XExecutableMember
Returns the signature.

Specified by:
getSignature in interface XExecutableMember
Returns:
the signature

getNameWithSignature

public final java.lang.String getNameWithSignature()
Deprecated. use getSignature(boolean)

Specified by:
getNameWithSignature in interface XExecutableMember
Returns:
the name and signature

getSignature

public final java.lang.String getSignature(boolean withParam)
Gets the signature

Specified by:
getSignature in interface XExecutableMember
Parameters:
withParam - if true, include the parameters in the signature. Otherwise, only the types will be used.
Returns:
the signature

getNameWithSignature

public final java.lang.String getNameWithSignature(boolean withParam)
Gets the name and signature

Specified by:
getNameWithSignature in interface XExecutableMember
Parameters:
withParam - if true, include the parameters in the signature. Otherwise, only the types will be used.
Returns:
the name and signature

getParameterTypes

public java.lang.String getParameterTypes()
Description copied from interface: XExecutableMember
Returns the parameters as a comma separated list of classes. E.g. a method with signature (java.lang.String,int) would return java.lang.String.class, java.lang.Integer.TYPE .

Specified by:
getParameterTypes in interface XExecutableMember
Returns:
comma separated list of types for all parameters.

getThrownExceptions

public java.util.List getThrownExceptions()
Description copied from interface: XExecutableMember
Returns the thrown exception classes.

Specified by:
getThrownExceptions in interface XExecutableMember
Returns:
a Collection of XClass.

getSuperElement

public XProgramElement getSuperElement(boolean forMethod)

throwsException

public boolean throwsException(java.lang.String exception_class_name)
Description copied from interface: XExecutableMember
Return true if the member throws the specified exception in its throws block.

Specified by:
throwsException in interface XExecutableMember
Parameters:
exception_class_name -
Returns:
true if the member throws the exception

addParameterData

public void addParameterData(java.lang.String type,
                             java.lang.String name,
                             int dimension)
Adds a parameter

Parameters:
type - qualified nyme of parameter type
name - parameter name
dimension - parameter dimension

addThrownException

public void addThrownException(java.lang.String thrownException)

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getParameterType

final java.lang.String getParameterType(int index)

getParameterName

final java.lang.String getParameterName(int index)

getParameterDimension

final int getParameterDimension(int index)

getSuperInterfaceElements

public java.util.List getSuperInterfaceElements()
Specified by:
getSuperInterfaceElements in interface XProgramElement