|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.qdox.model.AbstractBaseJavaEntity
com.thoughtworks.qdox.model.AbstractJavaEntity
com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
com.thoughtworks.qdox.model.JavaMethod
public class JavaMethod
Field Summary |
---|
Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity |
---|
modifiers |
Fields inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity |
---|
name, parent |
Constructor Summary | |
---|---|
JavaMethod()
The default constructor |
|
JavaMethod(java.lang.String name)
Create new method without parameters and return type |
|
JavaMethod(Type returns,
java.lang.String name)
Create a new method without parameters |
Method Summary | |
---|---|
void |
addParameter(JavaParameter javaParameter)
|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getCallSignature()
|
java.lang.String |
getDeclarationSignature(boolean withModifiers)
|
Type[] |
getExceptions()
|
Type |
getGenericReturnType()
Equivalent of java.lang.reflect.Method.getGenericReturnType() |
JavaParameter |
getParameterByName(java.lang.String name)
|
JavaParameter[] |
getParameters()
|
Type[] |
getParameterTypes()
|
Type[] |
getParameterTypes(boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types |
protected Type[] |
getParameterTypes(boolean resolve,
JavaClass callingClass)
|
java.lang.String |
getPropertyName()
|
Type |
getPropertyType()
|
Type |
getReturns()
Deprecated. it is recommended to use getReturnType() |
Type |
getReturnType()
Equivalent of java.lang.reflect.Method.getReturnType() |
Type |
getReturnType(boolean resolve)
If a class inherits this method from a generic class or interface, you can use this method to get the resolved return type |
protected Type |
getReturnType(boolean resolve,
JavaClass callingClass)
|
java.lang.String |
getSourceCode()
Get the original source code of the body of this method. |
DocletTag[] |
getTagsByName(java.lang.String name,
boolean inherited)
|
TypeVariable[] |
getTypeParameters()
|
int |
hashCode()
|
boolean |
isConstructor()
|
boolean |
isPropertyAccessor()
|
boolean |
isPropertyMutator()
|
boolean |
isPublic()
|
boolean |
isVarArgs()
|
void |
setConstructor(boolean constructor)
|
void |
setExceptions(Type[] exceptions)
|
void |
setReturns(Type returns)
Define the return type of this method |
void |
setSourceCode(java.lang.String sourceCode)
|
void |
setTypeParameters(TypeVariable[] typeParameters)
|
boolean |
signatureMatches(java.lang.String name,
Type[] parameterTypes)
Deprecated. use overloaded method |
boolean |
signatureMatches(java.lang.String name,
Type[] parameterTypes,
boolean varArg)
|
java.lang.String |
toString()
|
protected void |
writeBody(IndentBuffer result)
|
protected void |
writeBody(IndentBuffer result,
boolean withModifiers,
boolean isDeclaration,
boolean isPrettyPrint)
|
Methods inherited from class com.thoughtworks.qdox.model.AbstractInheritableJavaEntity |
---|
getTagByName |
Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity |
---|
getCodeBlock, getComment, getModifiers, getNamedParameter, getParentClass, getSource, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setModifiers, setParentClass, setTags, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers |
Methods inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity |
---|
getAnnotations, getLineNumber, getName, getParent, setAnnotations, setLineNumber, setName, setParent |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JavaMethod()
public JavaMethod(java.lang.String name)
name
- the name of the methodpublic JavaMethod(Type returns, java.lang.String name)
returns
- the return typename
- the name of this methodMethod Detail |
---|
public Type getReturns()
public JavaParameter[] getParameters()
public JavaParameter getParameterByName(java.lang.String name)
public Type[] getExceptions()
public boolean isConstructor()
public boolean isVarArgs()
protected void writeBody(IndentBuffer result)
writeBody
in class AbstractJavaEntity
protected void writeBody(IndentBuffer result, boolean withModifiers, boolean isDeclaration, boolean isPrettyPrint)
public java.lang.String getDeclarationSignature(boolean withModifiers)
getDeclarationSignature
in interface Member
public java.lang.String getCallSignature()
getCallSignature
in interface Member
public void setReturns(Type returns)
returns
- the return typepublic void addParameter(JavaParameter javaParameter)
public void setExceptions(Type[] exceptions)
public void setConstructor(boolean constructor)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean signatureMatches(java.lang.String name, Type[] parameterTypes)
name
- parameterTypes
-
public boolean signatureMatches(java.lang.String name, Type[] parameterTypes, boolean varArg)
name
- method nameparameterTypes
- parameter types or null if there are no parameters.
public int hashCode()
hashCode
in class java.lang.Object
public boolean isPublic()
isPublic
in class AbstractJavaEntity
public boolean isPropertyAccessor()
public boolean isPropertyMutator()
public Type getPropertyType()
public java.lang.String getPropertyName()
public DocletTag[] getTagsByName(java.lang.String name, boolean inherited)
getTagsByName
in class AbstractInheritableJavaEntity
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String getSourceCode()
public void setSourceCode(java.lang.String sourceCode)
public void setTypeParameters(TypeVariable[] typeParameters)
public TypeVariable[] getTypeParameters()
public java.lang.String toString()
toString
in class java.lang.Object
public Type getGenericReturnType()
public Type getReturnType()
public Type getReturnType(boolean resolve)
resolve
-
protected Type getReturnType(boolean resolve, JavaClass callingClass)
resolve
- callingClass
-
public Type[] getParameterTypes()
public Type[] getParameterTypes(boolean resolve)
resolve
-
protected Type[] getParameterTypes(boolean resolve, JavaClass callingClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |