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.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
 
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
 

Method Detail

addException

public 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

public 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

public 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

public 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

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


removeParameter

public 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

public 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().