Class MethodImpl
- java.lang.Object
-
- org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
-
- org.apache.xmlbeans.impl.jam.internal.elements.AnnotatedElementImpl
-
- org.apache.xmlbeans.impl.jam.internal.elements.MemberImpl
-
- org.apache.xmlbeans.impl.jam.internal.elements.InvokableImpl
-
- org.apache.xmlbeans.impl.jam.internal.elements.MethodImpl
-
- All Implemented Interfaces:
java.lang.Comparable
,JAnnotatedElement
,JElement
,JInvokable
,JMember
,JMethod
,MAnnotatedElement
,MElement
,MInvokable
,MMember
,MMethod
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.
-
-
Field Summary
-
Fields inherited from class org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
NO_ANNOTATION, NO_CLASS, NO_COMMENT, NO_CONSTRUCTOR, NO_FIELD, NO_METHOD, NO_NODE, NO_PACKAGE, NO_PARAMETER, NO_PROPERTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(JVisitor visitor)
Accepts the given visitor.void
accept(MVisitor visitor)
java.lang.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(java.lang.String className)
Sets the type of this method's return value.void
setReturnType(JClass c)
Sets the type of this method's return value.void
setUnqualifiedReturnType(java.lang.String unqualifiedTypeName)
-
Methods inherited from class org.apache.xmlbeans.impl.jam.internal.elements.InvokableImpl
addException, addException, addNewParameter, addUnqualifiedException, getExceptionTypes, getMutableParameters, getParameters, removeException, removeException, removeParameter, setUnqualifiedThrows
-
Methods inherited from class org.apache.xmlbeans.impl.jam.internal.elements.MemberImpl
getContainingClass, getModifiers, isPackagePrivate, isPrivate, isProtected, isPublic, setModifiers
-
Methods inherited from class org.apache.xmlbeans.impl.jam.internal.elements.AnnotatedElementImpl
addAnnotationForProxy, addLiteralAnnotation, createComment, findOrCreateAnnotation, getAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getComment, getEditableProxy, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeAnnotation, removeComment
-
Methods inherited from class org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
compareTo, createSourcePosition, defaultName, equals, getArtifact, getClassLoader, getContext, getMutableSourcePosition, getParent, getSimpleName, getSourcePosition, hashCode, removeSourcePosition, setArtifact, setSimpleName, toString
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.JAnnotatedElement
getAllJavadocTags, getAnnotation, getAnnotation, getAnnotationProxy, getAnnotations, getAnnotationValue, getComment
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.JElement
getArtifact, getParent, getSimpleName, getSourcePosition, toString
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.JInvokable
getExceptionTypes, getParameters
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.JMember
getContainingClass, getModifiers, isPackagePrivate, isPrivate, isProtected, isPublic
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.mutable.MAnnotatedElement
addLiteralAnnotation, createComment, findOrCreateAnnotation, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeComment
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.mutable.MElement
createSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleName
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.mutable.MInvokable
addException, addException, addNewParameter, getMutableParameters, removeException, removeException, removeParameter
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.mutable.MMember
setModifiers
-
-
-
-
Method Detail
-
setReturnType
public void setReturnType(java.lang.String className)
Description copied from interface:MMethod
Sets the type of this method's return value. Null can be passed if a 'void' return type is desired.
- Specified by:
setReturnType
in interfaceMMethod
-
setUnqualifiedReturnType
public void setUnqualifiedReturnType(java.lang.String unqualifiedTypeName)
- Specified by:
setUnqualifiedReturnType
in interfaceMMethod
-
setReturnType
public void setReturnType(JClass c)
Description copied from interface:MMethod
Sets 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()).
- Specified by:
setReturnType
in interfaceMMethod
-
getReturnType
public JClass getReturnType()
Description copied from interface:JMethod
Returns a JClass object representing the type of this methods return value. Note that void methods will return a JClass representing void.- Specified by:
getReturnType
in interfaceJMethod
-
isFinal
public boolean isFinal()
Description copied from interface:JMethod
Return true if this method is declared final.
-
isStatic
public boolean isStatic()
Description copied from interface:JMethod
Return true if this method is static.
-
isAbstract
public boolean isAbstract()
Description copied from interface:JMethod
Return true if this member is final. Note that constructors are fields are never abstract.- Specified by:
isAbstract
in interfaceJMethod
-
isNative
public boolean isNative()
Description copied from interface:JMethod
Returns true if this method is declared native.
-
isSynchronized
public boolean isSynchronized()
Description copied from interface:JMethod
Returns true if this method is declared synchronized.- Specified by:
isSynchronized
in interfaceJMethod
-
accept
public void accept(JVisitor visitor)
Description copied from interface:JElement
Accepts the given visitor.
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface:JElement
Returns 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.
- Specified by:
getQualifiedName
in interfaceJElement
- Specified by:
getQualifiedName
in interfaceJMethod
- Overrides:
getQualifiedName
in classInvokableImpl
-
-