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 voidaccept(JVisitor visitor)Accepts the given visitor.voidaccept(MVisitor visitor)java.lang.StringgetQualifiedName()Returns a qualified name for this abstraction.JClassgetReturnType()Returns a JClass object representing the type of this methods return value.booleanisAbstract()Return true if this member is final.booleanisFinal()Return true if this method is declared final.booleanisNative()Returns true if this method is declared native.booleanisStatic()Return true if this method is static.booleanisSynchronized()Returns true if this method is declared synchronized.voidsetReturnType(java.lang.String className)Sets the type of this method's return value.voidsetReturnType(JClass c)Sets the type of this method's return value.voidsetUnqualifiedReturnType(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:MMethodSets the type of this method's return value. Null can be passed if a 'void' return type is desired.
- Specified by:
setReturnTypein interfaceMMethod
-
setUnqualifiedReturnType
public void setUnqualifiedReturnType(java.lang.String unqualifiedTypeName)
- Specified by:
setUnqualifiedReturnTypein interfaceMMethod
-
setReturnType
public void setReturnType(JClass c)
Description copied from interface: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()).
- Specified by:
setReturnTypein interfaceMMethod
-
getReturnType
public JClass getReturnType()
Description copied from interface:JMethodReturns a JClass object representing the type of this methods return value. Note that void methods will return a JClass representing void.- Specified by:
getReturnTypein interfaceJMethod
-
isFinal
public boolean isFinal()
Description copied from interface:JMethodReturn true if this method is declared final.
-
isStatic
public boolean isStatic()
Description copied from interface:JMethodReturn true if this method is static.
-
isAbstract
public boolean isAbstract()
Description copied from interface:JMethodReturn true if this member is final. Note that constructors are fields are never abstract.- Specified by:
isAbstractin interfaceJMethod
-
isNative
public boolean isNative()
Description copied from interface:JMethodReturns true if this method is declared native.
-
isSynchronized
public boolean isSynchronized()
Description copied from interface:JMethodReturns true if this method is declared synchronized.- Specified by:
isSynchronizedin interfaceJMethod
-
accept
public void accept(JVisitor visitor)
Description copied from interface:JElementAccepts the given visitor.
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface: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.
- Specified by:
getQualifiedNamein interfaceJElement- Specified by:
getQualifiedNamein interfaceJMethod- Overrides:
getQualifiedNamein classInvokableImpl
-
-