xjavadoc
Class AbstractExecutableMember

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

abstract class AbstractExecutableMember
extends MemberImpl
implements XExecutableMember

Baseclass for XExecutableMember.

Author:
Aslak Hellesøy

Field Summary
 
Fields inherited from class xjavadoc.AbstractProgramElement
EMPTY_LIST
 
Constructor Summary
protected AbstractExecutableMember(AbstractClass containingClass, XTagFactory tagFactory)
           
 
Method Summary
 void addParameterData(String type, String name, int dimension)
          Adds a parameter
 void addThrownException(String thrownException)
           
protected abstract  String buildStringId()
           
 boolean equals(Object o)
           
 String getName()
          Get name
 String getNameWithSignature(boolean withParam)
          Gets the name and signature
(package private)  int getParameterDimension(int index)
           
(package private)  String getParameterName(int index)
           
 List getParameters()
          Returns the method parameters.
(package private)  String getParameterType(int index)
           
 String getParameterTypes()
          Returns the parameters as a comma separated list of classes.
 String getSignature(boolean withParam)
          Gets the signature
 XProgramElement getSuperElement(boolean forMethod)
           
 List getSuperInterfaceElements()
           
 List getThrownExceptions()
          Returns the thrown exception classes.
 int hashCode()
           
 boolean isNative()
          Gets the Native attribute of the AbstractExecutableMember object
 boolean isSynchronized()
          Gets the Synchronized attribute of the AbstractExecutableMember object
 void setName(String name)
           
 boolean throwsException(String exception_class_name)
          Return true if the member throws the specified exception in its throws block.
 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
isConstructor
 
Methods inherited from interface xjavadoc.XProgramElement
getContainingClass, getContainingPackage, getDoc, getModifiers, getModifierSpecifier, getSuperElement, getSuperInterfaceElements, getXJavaDoc, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, updateDoc
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface xjavadoc.Named
getName
 

Constructor Detail

AbstractExecutableMember

protected AbstractExecutableMember(AbstractClass containingClass,
                                   XTagFactory tagFactory)
Method Detail

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 List getParameters()
Returns the method parameters.

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

getSignature

public final 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 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 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 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(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(String type,
                             String name,
                             int dimension)
Adds a parameter

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

addThrownException

public void addThrownException(String thrownException)

equals

public boolean equals(Object o)

hashCode

public int hashCode()

toString

public String toString()

buildStringId

protected abstract String buildStringId()

getParameterType

final String getParameterType(int index)

getParameterName

final String getParameterName(int index)

getParameterDimension

final int getParameterDimension(int index)

getName

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

Specified by:
getName in interface Named
Returns:
name

setName

public void setName(String name)

getSuperInterfaceElements

public List getSuperInterfaceElements()
Specified by:
getSuperInterfaceElements in interface XProgramElement


Copyright © 2002-2004 XDoclet Team. All Rights Reserved.