org.codehaus.jam.mutable
Interface MInvokable

All Superinterfaces:
JAnnotatedElement, JElement, JInvokable, JMember, MAnnotatedElement, MElement, MMember
All Known Subinterfaces:
MConstructor, MMethod

public interface MInvokable
extends JInvokable, MMember

Mutable version of JInvokable.

Author:
Patrick Calahan <email: pcal-at-bea-dot-com>

Method Summary
 void addException(JClass exceptionClass)
          Adds a declaration of a checked exception of the given type.
 void addException(java.lang.String qualifiedClassName)
          Adds a declaration of a checked exception of the given type.
 MParameter addNewParameter()
          Creates a new parameter on this method of type java.lang.Object and with a default name.
 MParameter[] getMutableParameters()
          Returns all of the parameters on this method, or an empty array if there are none.
 void removeException(JClass exceptionClass)
          Removes a declaration of a checked exception of the given class.
 void removeException(java.lang.String qualifiedClassName)
          Removes a declaration of a checked exception of the named class.
 void removeParameter(MParameter parameter)
          Removes the given parameter.
 
Methods inherited from interface org.codehaus.jam.JInvokable
getExceptionTypes, getParameters
 
Methods inherited from interface org.codehaus.jam.mutable.MMember
setModifiers
 
Methods inherited from interface org.codehaus.jam.mutable.MAnnotatedElement
addLiteralAnnotation, createComment, findOrCreateAnnotation, getMutableAnnotation, getMutableAnnotations, getMutableComment, removeComment
 
Methods inherited from interface org.codehaus.jam.mutable.MElement
accept, createSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleName
 
Methods inherited from interface org.codehaus.jam.JMember
getContainingClass, getModifiers, isPackagePrivate, isPrivate, isProtected, isPublic
 
Methods inherited from interface org.codehaus.jam.JAnnotatedElement
getAllJavadocTags, getAnnotation, getAnnotation, getAnnotations, getAnnotationValue, getComment
 
Methods inherited from interface org.codehaus.jam.JElement
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, isSourceAvailable, toString
 

Method Detail

addException

void addException(java.lang.String qualifiedClassName)

Adds a declaration of a checked exception of the given type.

Throws:
java.lang.IllegalArgumentException - if the parameter is null or is not a valid class name.

addException

void addException(JClass exceptionClass)

Adds a declaration of a checked exception of the given type.

Throws:
java.lang.IllegalArgumentException - if the parameter is null or represents a class which does not extend throwable.

removeException

void removeException(java.lang.String qualifiedClassName)
Removes a declaration of a checked exception of the named class. Does nothing if no such declaration exists.

Throws:
java.lang.IllegalArgumentException - if the parameter is null or is not a valid class name.

removeException

void removeException(JClass exceptionClass)
Removes a declaration of a checked exception of the given class. Does nothing if no such declaration exists.

Throws:
java.lang.IllegalArgumentException - if the parameter is null.

addNewParameter

MParameter addNewParameter()
Creates a new parameter on this method of type java.lang.Object and with a default name.


removeParameter

void removeParameter(MParameter parameter)
Removes the given parameter. Does nothing if the parameter is not present on this method.

Throws:
java.lang.IllegalArgumentException - if either parameter is null.

getMutableParameters

MParameter[] getMutableParameters()
Returns all of the parameters on this method, or an empty array if there are none. This is simply a more strongly-typed version of getParameters().