public class JavaMethodDelegate extends java.lang.Object implements JavaMethod
| Constructor and Description |
|---|
JavaMethodDelegate(JavaClass callingClass,
JavaMethod originalMethod) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<JavaAnnotation> |
getAnnotations()
Equivalent of
AnnotatedElement.getAnnotations() |
java.lang.String |
getCallSignature() |
java.lang.String |
getCodeBlock() |
java.lang.String |
getComment()
Retrieve the javadoc comment of this annotated element.
|
java.lang.String |
getDeclarationSignature(boolean withModifiers) |
JavaClass |
getDeclaringClass()
Equivalent of
Member.getDeclaringClass() |
java.util.List<JavaClass> |
getExceptions()
Equivalent of
Executable.getExceptionTypes() |
java.util.List<JavaType> |
getExceptionTypes() |
int |
getLineNumber()
The line number where this element started
|
java.util.List<java.lang.String> |
getModifiers()
Equivalent of
Member.getModifiers()
This does not follow the java-api
With the Member-class, getModifiers returns an int, which should be decoded with the Modifier. |
java.lang.String |
getName()
Equivalent of
Member.getName() |
java.lang.String |
getNamedParameter(java.lang.String tagName,
java.lang.String parameterName)
Convenience method for
getTagByName(String).getNamedParameter(String)
that also checks for null tag. |
JavaParameter |
getParameterByName(java.lang.String name) |
java.util.List<JavaParameter> |
getParameters()
Equivalent of
Executable.getParameterTypes(), where a JavaParameter also contains the original name if available. |
java.util.List<JavaType> |
getParameterTypes()
Equivalent of
Executable.getParameterTypes() |
java.util.List<JavaType> |
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
|
java.lang.String |
getPropertyName() |
JavaType |
getPropertyType() |
JavaClass |
getReturns() |
JavaType |
getReturnType()
Equivalent of java.lang.reflect.Method.getReturnType()
|
JavaType |
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
|
java.lang.String |
getSourceCode()
Get the original source code of the body of this method.
|
DocletTag |
getTagByName(java.lang.String name)
Retrieve the doclettag by the specified name.
|
DocletTag |
getTagByName(java.lang.String name,
boolean inherited) |
java.util.List<DocletTag> |
getTags()
Retrieve all defined doclet tags.
|
java.util.List<DocletTag> |
getTagsByName(java.lang.String name)
Retrieve all doclettags with a specific name.
|
java.util.List<DocletTag> |
getTagsByName(java.lang.String name,
boolean inherited) |
java.util.List<JavaTypeVariable<JavaMethod>> |
getTypeParameters()
Equivalent of
GenericDeclaration.getTypeParameters() |
int |
hashCode() |
boolean |
isAbstract()
Equivalent of
Modifier.isAbstract(int) |
boolean |
isDefault()
Equivalent
Method.isDefault() |
boolean |
isFinal()
Equivalent of
Modifier.isFinal(int) |
boolean |
isNative()
Equivalent of
Modifier.isNative(int) |
boolean |
isPrivate()
Equivalent of
Modifier.isPrivate(int) |
boolean |
isPropertyAccessor()
Returns
true if this method follows the bean convention of being an accessor. |
boolean |
isPropertyMutator()
Returns
true if this method follows the bean convention of being an mutator. |
boolean |
isProtected()
Equivalent of
Modifier.isProtected(int) |
boolean |
isPublic()
Equivalent of
Modifier.isPublic(int) |
boolean |
isStatic()
Equivalent of
Modifier.isStatic(int) |
boolean |
isStrictfp()
Equivalent of
Modifier.isStrict(int) |
boolean |
isSynchronized()
Equivalent of
Modifier.isSynchronized(int) |
boolean |
isTransient()
Equivalent of
Modifier.isTransient(int) |
boolean |
isVarArgs()
Equivalent of
Executable.isVarArgs() |
boolean |
isVolatile()
Equivalent of
Modifier.isVolatile(int) |
boolean |
signatureMatches(java.lang.String name,
java.util.List<JavaType> parameterTypes)
This method is NOT varArg aware.
|
boolean |
signatureMatches(java.lang.String name,
java.util.List<JavaType> parameterTypes,
boolean varArg) |
java.lang.String |
toString() |
public JavaMethodDelegate(JavaClass callingClass, JavaMethod originalMethod)
public JavaType getReturnType(boolean resolve)
JavaMethodgetReturnType in interface JavaMethodresolve - define if generic should be resolvedpublic java.util.List<JavaType> getParameterTypes(boolean resolve)
getParameterTypes in interface JavaExecutableresolve - true if the resolved types should be returned, otherwise falsepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.util.List<JavaAnnotation> getAnnotations()
AnnotatedElement.getAnnotations()getAnnotations in interface JavaAnnotatedElementnullpublic java.lang.String getCallSignature()
getCallSignature in interface JavaExecutablegetCallSignature in interface JavaMethodpublic java.lang.String getCodeBlock()
getCodeBlock in interface JavaModelpublic java.lang.String getComment()
getComment in interface JavaAnnotatedElementnullpublic JavaClass getDeclaringClass()
Member.getDeclaringClass()getDeclaringClass in interface JavaExecutablegetDeclaringClass in interface JavaMemberpublic java.lang.String getDeclarationSignature(boolean withModifiers)
getDeclarationSignature in interface JavaMethodwithModifiers - true if modifiers should be added, otherwise falsepublic java.util.List<JavaClass> getExceptions()
Executable.getExceptionTypes()getExceptions in interface JavaExecutablenullpublic java.util.List<JavaType> getExceptionTypes()
getExceptionTypes in interface JavaExecutablepublic boolean isDefault()
Method.isDefault()isDefault in interface JavaMethodtrue if this is a default method of an interface, otherwise falsepublic int getLineNumber()
getLineNumber in interface JavaModelpublic java.util.List<java.lang.String> getModifiers()
Member.getModifiers()
This does not follow the java-api
With the Member-class, getModifiers returns an int, which should be decoded with the Modifier.
If this member was extracted from a source, it will keep its order.
Otherwise if will be in the preferred order of the java-api.getModifiers in interface JavaMemberpublic java.lang.String getName()
Member.getName()getName in interface JavaMemberpublic java.lang.String getNamedParameter(java.lang.String tagName,
java.lang.String parameterName)
getTagByName(String).getNamedParameter(String)
that also checks for null tag.getNamedParameter in interface JavaAnnotatedElementtagName - the tag nameparameterName - the parameter namenullpublic JavaParameter getParameterByName(java.lang.String name)
getParameterByName in interface JavaExecutablename - the name of the parameterJavaParameter matching the name, otherwise nullpublic java.util.List<JavaParameter> getParameters()
Executable.getParameterTypes(), where a JavaParameter also contains the original name if available.getParameters in interface JavaExecutablenullpublic java.lang.String getPropertyName()
getPropertyName in interface JavaMethodnull if this method
is not a property mutator or property accessor.public JavaType getPropertyType()
getPropertyType in interface JavaMethodnull if this method
is not a property mutator or property accessor.public JavaClass getReturns()
getReturns in interface JavaMethodpublic java.lang.String getSourceCode()
getSourceCode in interface JavaExecutablepublic DocletTag getTagByName(java.lang.String name, boolean inherited)
getTagByName in interface JavaMethodpublic DocletTag getTagByName(java.lang.String name)
getTagByName in interface JavaAnnotatedElementname - the name of the doclettag trying to retrievenullpublic java.util.List<DocletTag> getTags()
getTags in interface JavaAnnotatedElementnullpublic java.util.List<DocletTag> getTagsByName(java.lang.String name, boolean inherited)
getTagsByName in interface JavaMethodpublic java.util.List<DocletTag> getTagsByName(java.lang.String name)
getTagsByName in interface JavaAnnotatedElementname - the name of the doclet tagnullpublic java.util.List<JavaTypeVariable<JavaMethod>> getTypeParameters()
GenericDeclaration.getTypeParameters()getTypeParameters in interface JavaGenericDeclarationnullpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isAbstract()
Modifier.isAbstract(int)isAbstract in interface JavaMembertrue if this member is abstract, otherwise falsepublic boolean isFinal()
Modifier.isFinal(int)isFinal in interface JavaMembertrue is this member is final, otherwise falsepublic boolean isNative()
Modifier.isNative(int)isNative in interface JavaMembertrue if this member is native, otherwise falsepublic boolean isPrivate()
Modifier.isPrivate(int)isPrivate in interface JavaMembertrue if this member is private, otherwise falsepublic boolean isPropertyAccessor()
true if this method follows the bean convention of being an accessor.
public String getName(); // true public boolean isValid() // true public String getName( String def ); // false, it has a parameter public String gettingUp(); // false, 'get' is not followed by an uppercase character public boolean isolate(); // false, 'is' is not followed by an uppercase character public static String getName(); // false, it is static
isPropertyAccessor in interface JavaMethodtrue if this method is a Java Bean accessor, otherwise falsepublic boolean isPropertyMutator()
true if this method follows the bean convention of being an mutator.
public void setName(String name); // true public void setUp(); // false, it has no parameter public void settingUp(String def); // false, 'set' is not followed by an uppercase character public static void setName(String name); // false, it is static
isPropertyMutator in interface JavaMethodtrue if this method is a Java Bean mutator, otherwise falsepublic boolean isProtected()
Modifier.isProtected(int)isProtected in interface JavaMembertrue if this member is protected; otherwise falsepublic boolean isPublic()
Modifier.isPublic(int)isPublic in interface JavaMembertrue if this member is public, otherwise falsepublic boolean isStatic()
Modifier.isStatic(int)isStatic in interface JavaMembertrue if this member is static, otherwise falsepublic boolean isStrictfp()
Modifier.isStrict(int)isStrictfp in interface JavaMembertrue if this member is strictfp, otherwise falsepublic boolean isSynchronized()
Modifier.isSynchronized(int)isSynchronized in interface JavaMembertrue if this member is synchronized, otherwise falsepublic boolean isTransient()
Modifier.isTransient(int)isTransient in interface JavaMembertrue if this member is transient, otherwise falsepublic boolean isVarArgs()
Executable.isVarArgs()isVarArgs in interface JavaExecutabletrue if the final parameter is a varArg, otherwise falsepublic boolean isVolatile()
Modifier.isVolatile(int)isVolatile in interface JavaMembertrue if this member is volatile, otherwise falsepublic boolean signatureMatches(java.lang.String name,
java.util.List<JavaType> parameterTypes,
boolean varArg)
signatureMatches in interface JavaMethodname - the name of the methodparameterTypes - the parameter types, can be nullvarArg - true is signature should match a varArg-method, otherwise falsetrue if this method matches the signature, otherwise falsepublic boolean signatureMatches(java.lang.String name,
java.util.List<JavaType> parameterTypes)
signatureMatches in interface JavaMethodname - the name of the methodparameterTypes - the parameter types of the method, can be nulltrue if this method matches the signature, otherwise falsepublic java.lang.String toString()
toString in class java.lang.Objectpublic JavaType getReturnType()
getReturnType in interface JavaMethodpublic java.util.List<JavaType> getParameterTypes()
Executable.getParameterTypes()getParameterTypes in interface JavaExecutablenullCopyright © 2002-2018. All Rights Reserved.