|
|||||||||||
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 | |
static int |
instanceCount
|
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(String type,
String name,
int dimension)
Adds a parameter |
void |
addThrownException(String thrownException)
|
protected String |
buildStringId()
|
boolean |
equals(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. |
XMethod |
getMutator()
If this method is an accessor, and a corresponding mutator exists, that mutator will be returned. |
String |
getName()
Get name |
String |
getNameWithoutPrefix()
Returns the name of the method with the prefix stripped away. |
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 |
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. |
String |
getSignature(boolean withParam)
Gets the signature |
XProgramElement |
getSuperElement()
|
XProgramElement |
getSuperElement(boolean forMethod)
|
List |
getSuperInterfaceElements()
|
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(String name)
|
void |
setReturnDimension(int d)
Sets the ReturnDimension attribute of the SourceMethod object |
void |
setReturnType(String returnType)
Sets the ReturnType attribute of the SourceMethod object |
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 |
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
Constructor Detail |
public MethodImpl(AbstractClass containingClass, XTagFactory tagFactory)
Method Detail |
public final boolean isConstructor()
isConstructor
in interface XExecutableMember
public final Type getReturnType()
XMethod
getReturnType
in interface XMethod
public XProgramElement getSuperElement()
getSuperElement
in interface XProgramElement
public List getSuperInterfaceElements()
getSuperInterfaceElements
in interface XProgramElement
getSuperInterfaceElements
in class MemberImpl
public XMethod getAccessor()
XMethod
getAccessor
in interface XMethod
public XMethod getMutator()
XMethod
getMutator
in interface XMethod
public boolean isPropertyAccessor()
isPropertyAccessor
in interface XMethod
public boolean isPropertyMutator()
isPropertyMutator
in interface XMethod
public String getPropertyName()
XMethod
getPropertyName
in interface XMethod
public Type getPropertyType()
XMethod
getPropertyType
in interface XMethod
XMethod.isPropertyMutator()
,
XMethod.isPropertyAccessor()
,
XMethod.getPropertyName()
public String getNameWithoutPrefix()
XMethod
getNameWithoutPrefix
in interface XMethod
public final void setReturnType(String returnType)
returnType
- The new ReturnType valuepublic final void setReturnDimension(int d)
d
- The new ReturnDimension valuepublic boolean equals(Object o)
equals
in class AbstractExecutableMember
o
-
public int hashCode()
hashCode
in class AbstractExecutableMember
public String toString()
toString
in class AbstractExecutableMember
protected String buildStringId()
buildStringId
in class AbstractExecutableMember
public final boolean isNative()
isNative
in interface XExecutableMember
public final boolean isSynchronized()
isSynchronized
in interface XExecutableMember
public final List getParameters()
getParameters
in interface XExecutableMember
public final String getSignature(boolean withParam)
getSignature
in interface XExecutableMember
withParam
- if true, include the parameters in the signature.
Otherwise, only the types will be used.
public final String getNameWithSignature(boolean withParam)
getNameWithSignature
in interface XExecutableMember
withParam
- if true, include the parameters in the signature.
Otherwise, only the types will be used.
public String getParameterTypes()
XExecutableMember
(java.lang.String,int)
would return
java.lang.String.class, java.lang.Integer.TYPE
.
getParameterTypes
in interface XExecutableMember
public List getThrownExceptions()
XExecutableMember
getThrownExceptions
in interface XExecutableMember
XClass
.public XProgramElement getSuperElement(boolean forMethod)
public boolean throwsException(String exception_class_name)
XExecutableMember
throwsException
in interface XExecutableMember
exception_class_name
-
public void addParameterData(String type, String name, int dimension)
type
- qualified nyme of parameter typename
- parameter namedimension
- parameter dimensionpublic void addThrownException(String thrownException)
final String getParameterType(int index)
final String getParameterName(int index)
final int getParameterDimension(int index)
public String getName()
Named
getName
in interface Named
public void setName(String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |