equals
public 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. Methods are compared for
equality when calling XClass.getMethods(true)
- equals in interface AbstractExecutableMember
o
-
getAccessor
public XMethod getAccessor()
If this method is a mutator, and a corresponding accessor exists, that
accessor will be returned. Otherwise, null is returned.
- getAccessor in interface XMethod
- the corresponding accessor.
getMethodNameWithSignatureAndModifiers
private String getMethodNameWithSignatureAndModifiers()
getMethodNameWithSignatureWithoutModifiers
private String getMethodNameWithSignatureWithoutModifiers()
getMutator
public XMethod getMutator()
If this method is an accessor, and a corresponding mutator exists, that
mutator will be returned. Otherwise, null is returned.
- getMutator in interface XMethod
- the corresponding mutator.
getNameWithoutPrefix
public String getNameWithoutPrefix()
Returns the name of the method with the prefix stripped away. The prefix is
the first series of lower case characters. Example:
- "isIt" -> "It"
- "setIt" -> "It"
- "addIt" -> "It"
- "createIt" -> "It"
- "isit" -> null
- getNameWithoutPrefix in interface XMethod
- the property name.
getPropertyName
public String getPropertyName()
Returns the property name of this method (if it is an accessor or mutator),
or null if it is not.
- getPropertyName in interface XMethod
- the property name.
getReturnType
public final Type getReturnType()
Returns the return type of the method.
- getReturnType in interface XMethod
- the return type of the method.
isConstructor
public final boolean isConstructor()
Gets the Constructor attribute of the SourceMethod object
- isConstructor in interface XExecutableMember
- The Constructor value
isPropertyAccessor
public boolean isPropertyAccessor()
- isPropertyAccessor in interface XMethod
- true if this is a public Xxx getXxx() method
isPropertyMutator
public boolean isPropertyMutator()
- isPropertyMutator in interface XMethod
- true if this is a public void setXxx(Xxx) method
setReturnDimension
public final void setReturnDimension(int d)
Sets the ReturnDimension attribute of the SourceMethod object
d
- The new ReturnDimension value
setReturnType
public final void setReturnType(String returnType)
Sets the ReturnType attribute of the SourceMethod object
returnType
- The new ReturnType value
toString
private String toString(boolean modifiers)
Builds a String uniquely describing this method
modifiers
-
- a String uniquely describing this method