|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectxjavadoc.AbstractProgramElement
xjavadoc.MemberImpl
xjavadoc.AbstractExecutableMember
xjavadoc.MethodImpl
Describe what this class does
| Nested Class Summary |
| Nested classes inherited from class xjavadoc.XMethod |
XMethod.PropertyAccessorPredicate, XMethod.PropertyMutatorPredicate |
| Field Summary | |
private ReturnType |
_returnType
|
static int |
instanceCount
|
private java.lang.String |
methodNameWithSignatureAndModifiers
|
private java.lang.String |
methodNameWithSignatureWithoutModifiers
|
| Fields inherited from class xjavadoc.AbstractProgramElement |
EMPTY_LIST |
| Fields inherited from interface xjavadoc.XMethod |
PROPERTY_ACCESSOR_PREDICATE, PROPERTY_MUTATOR_PREDICATE |
| Constructor Summary | |
MethodImpl(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)
Two methods are equal if they have the same return type, name and signature, regardless of the enclosing class and modifiers. |
XMethod |
getAccessor()
If this method is a mutator, and a corresponding accessor exists, that accessor will be returned. |
private java.lang.String |
getMethodNameWithSignatureAndModifiers()
|
private java.lang.String |
getMethodNameWithSignatureWithoutModifiers()
|
XMethod |
getMutator()
If this method is an accessor, and a corresponding mutator exists, that mutator will be returned. |
java.lang.String |
getName()
Get name |
java.lang.String |
getNameWithoutPrefix()
Returns the name of the method with the prefix stripped away. |
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 |
getPropertyName()
Returns the property name of this method (if it is an accessor or mutator), or null if it is not. |
Type |
getPropertyType()
Returns the type of the property this method represents, or null if this method is not a property method. |
Type |
getReturnType()
Returns the return type of the method. |
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()
Gets the Constructor attribute of the SourceMethod object |
boolean |
isNative()
Gets the Native attribute of the AbstractExecutableMember object |
boolean |
isPropertyAccessor()
|
boolean |
isPropertyMutator()
|
boolean |
isSynchronized()
Gets the Synchronized attribute of the AbstractExecutableMember object |
void |
setName(java.lang.String name)
|
void |
setReturnDimension(int d)
Sets the ReturnDimension attribute of the SourceMethod object |
void |
setReturnType(java.lang.String returnType)
Sets the ReturnType attribute of the SourceMethod object |
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()
|
private java.lang.String |
toString(boolean modifiers)
Builds a String uniquely describing this method |
| 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, getParameters, getParameterTypes, getSignature, getThrownExceptions, isNative, isSynchronized, throwsException |
| Methods inherited from interface xjavadoc.XProgramElement |
getContainingClass, getContainingPackage, getDoc, getModifiers, getModifierSpecifier, getXJavaDoc, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, updateDoc |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Methods inherited from interface xjavadoc.Named |
getName |
| Field Detail |
public static int instanceCount
private java.lang.String methodNameWithSignatureAndModifiers
private java.lang.String methodNameWithSignatureWithoutModifiers
private ReturnType _returnType
| Constructor Detail |
public MethodImpl(AbstractClass containingClass,
XTagFactory tagFactory)
| Method Detail |
public final boolean isConstructor()
isConstructor in interface XExecutableMemberpublic final Type getReturnType()
XMethod
getReturnType in interface XMethodpublic XProgramElement getSuperElement()
getSuperElement in interface XProgramElementpublic java.util.List getSuperInterfaceElements()
getSuperInterfaceElements in interface XProgramElementgetSuperInterfaceElements in class MemberImplpublic XMethod getAccessor()
XMethod
getAccessor in interface XMethodpublic XMethod getMutator()
XMethod
getMutator in interface XMethodpublic boolean isPropertyAccessor()
isPropertyAccessor in interface XMethodpublic boolean isPropertyMutator()
isPropertyMutator in interface XMethodpublic java.lang.String getPropertyName()
XMethod
getPropertyName in interface XMethodpublic Type getPropertyType()
XMethod
getPropertyType in interface XMethodXMethod.isPropertyMutator(),
XMethod.isPropertyAccessor(),
XMethod.getPropertyName()public java.lang.String getNameWithoutPrefix()
XMethod
getNameWithoutPrefix in interface XMethodpublic final void setReturnType(java.lang.String returnType)
returnType - The new ReturnType valuepublic final void setReturnDimension(int d)
d - The new ReturnDimension valuepublic boolean equals(java.lang.Object o)
equals in class AbstractExecutableMembero -
public int hashCode()
hashCode in class AbstractExecutableMemberpublic java.lang.String toString()
toString in class AbstractExecutableMemberprotected java.lang.String buildStringId()
buildStringId in class AbstractExecutableMemberprivate java.lang.String getMethodNameWithSignatureAndModifiers()
private java.lang.String getMethodNameWithSignatureWithoutModifiers()
private java.lang.String toString(boolean modifiers)
modifiers -
public final boolean isNative()
isNative in interface XExecutableMemberpublic final boolean isSynchronized()
isSynchronized in interface XExecutableMemberpublic final java.util.List getParameters()
getParameters in interface XExecutableMemberpublic final java.lang.String getSignature(boolean withParam)
getSignature in interface XExecutableMemberwithParam - if true, include the parameters in the signature.
Otherwise, only the types will be used.
public final java.lang.String getNameWithSignature(boolean withParam)
getNameWithSignature in interface XExecutableMemberwithParam - if true, include the parameters in the signature.
Otherwise, only the types will be used.
public java.lang.String getParameterTypes()
XExecutableMember(java.lang.String,int) would return
java.lang.String.class, java.lang.Integer.TYPE.
getParameterTypes in interface XExecutableMemberpublic java.util.List getThrownExceptions()
XExecutableMember
getThrownExceptions in interface XExecutableMemberXClass.public XProgramElement getSuperElement(boolean forMethod)
public boolean throwsException(java.lang.String exception_class_name)
XExecutableMember
throwsException in interface XExecutableMemberexception_class_name -
public void addParameterData(java.lang.String type,
java.lang.String name,
int dimension)
type - qualified nyme of parameter typename - parameter namedimension - parameter dimensionpublic void addThrownException(java.lang.String thrownException)
final java.lang.String getParameterType(int index)
final java.lang.String getParameterName(int index)
final int getParameterDimension(int index)
public java.lang.String getName()
Named
getName in interface Namedpublic void setName(java.lang.String name)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||