public final class MethodImpl extends InvokableImpl implements MMethod
Standard implementation of MMethod. It's probably bad inheritance to extend ConstructorImpl, but it's convenient and no one should ever care since this is a private class; there is no inheritance between method and constructor in the public API.
NO_ANNOTATION, NO_CLASS, NO_COMMENT, NO_CONSTRUCTOR, NO_FIELD, NO_METHOD, NO_NODE, NO_PACKAGE, NO_PARAMETER, NO_PROPERTY| Modifier and Type | Method and Description |
|---|---|
void |
accept(JVisitor visitor)
Accepts the given visitor.
|
void |
accept(MVisitor visitor) |
String |
getQualifiedName()
Returns a qualified name for this abstraction.
|
JClass |
getReturnType()
Returns a JClass object representing the type of this methods
return value.
|
boolean |
isAbstract()
Return true if this member is final.
|
boolean |
isFinal()
Return true if this method is declared final.
|
boolean |
isNative()
Returns true if this method is declared native.
|
boolean |
isStatic()
Return true if this method is static.
|
boolean |
isSynchronized()
Returns true if this method is declared synchronized.
|
void |
setReturnType(JClass c)
Sets the type of this method's return value.
|
void |
setReturnType(String className)
Sets the type of this method's return value.
|
void |
setUnqualifiedReturnType(String unqualifiedTypeName) |
addException, addException, addNewParameter, addUnqualifiedException, getExceptionTypes, getMutableParameters, getParameters, removeException, removeException, removeParameter, setUnqualifiedThrowsgetContainingClass, getModifiers, isPackagePrivate, isPrivate, isProtected, isPublic, setModifiersaddAnnotationForProxy, addLiteralAnnotation, createComment, findOrCreateAnnotation, getAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getComment, getEditableProxy, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeAnnotation, removeCommentcompareTo, createSourcePosition, defaultName, equals, getArtifact, getClassLoader, getContext, getMutableSourcePosition, getParent, getSimpleName, getSourcePosition, hashCode, removeSourcePosition, setArtifact, setSimpleName, toStringaddException, addException, addNewParameter, getMutableParameters, removeException, removeException, removeParametergetExceptionTypes, getParameterssetModifiersaddLiteralAnnotation, createComment, findOrCreateAnnotation, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeCommentcreateSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleNamegetContainingClass, getModifiers, isPackagePrivate, isPrivate, isProtected, isPublicgetAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getCommentgetArtifact, getParent, getSimpleName, getSourcePosition, toStringpublic void setReturnType(String className)
MMethodSets the type of this method's return value. Null can be passed if a 'void' return type is desired.
setReturnType in interface MMethodpublic void setUnqualifiedReturnType(String unqualifiedTypeName)
setUnqualifiedReturnType in interface MMethodpublic void setReturnType(JClass c)
MMethodSets the type of this method's return value. Null may be passed if a 'void' return type is desired. This method is exactly equivalent to calling setReturnType(jclass.getQualifiedName()).
setReturnType in interface MMethodpublic JClass getReturnType()
JMethodgetReturnType in interface JMethodpublic boolean isFinal()
JMethodpublic boolean isStatic()
JMethodpublic boolean isAbstract()
JMethodisAbstract in interface JMethodpublic boolean isNative()
JMethodpublic boolean isSynchronized()
JMethodisSynchronized in interface JMethodpublic void accept(JVisitor visitor)
JElementAccepts the given visitor.
public String getQualifiedName()
JElementReturns a qualified name for this abstraction. The exact format of this name depends on the particular abstraction. Please refer to the documentation for each JElement subclass for a detailed description of the qualified name formats.
getQualifiedName in interface JElementgetQualifiedName in interface JMethodgetQualifiedName in class InvokableImplCopyright © 2010 - 2020 Adobe. All Rights Reserved