net.sf.jaxme.js
Class AbstractJavaMethod

java.lang.Object
  extended bynet.sf.jaxme.js.IndentationEngineImpl
      extended bynet.sf.jaxme.js.JavaSourceObject
          extended bynet.sf.jaxme.js.ConditionalIndentationJavaSourceObject
              extended bynet.sf.jaxme.js.AbstractJavaMethod
All Implemented Interfaces:
ConditionalIndentationEngine, IndentationEngine
Direct Known Subclasses:
JavaConstructor, JavaMethod

public abstract class AbstractJavaMethod
extends ConditionalIndentationJavaSourceObject

Author:
Jochen Wiedmann

Nested Class Summary
 
Nested classes inherited from class net.sf.jaxme.js.ConditionalIndentationJavaSourceObject
ConditionalIndentationJavaSourceObject.LJFImpl, ConditionalIndentationJavaSourceObject.LoopVariable
 
Field Summary
 
Fields inherited from interface net.sf.jaxme.js.IndentationEngine
NOTHING
 
Constructor Summary
AbstractJavaMethod(java.lang.String pName, JavaQName pType, JavaSource.Protection pProtection)
           
 
Method Summary
 DirectAccessible addParam(java.lang.Class p, java.lang.String v)
          Adds a parameter that this method takes.
 DirectAccessible addParam(JavaQName pType, java.lang.String pName)
          Adds a parameter that this method takes.
 DirectAccessible addParam(Parameter pParam)
          Adds a parameter that this method takes.
 void addParam(java.lang.String p)
          Deprecated. Use addParam(JavaQName, String)
 void addParam(java.lang.String p, java.lang.String v)
          Deprecated. Use addParam(JavaQName, String)
 void addThrows(java.lang.Class e)
          Adds an exception to this methods list of exceptions.
 void addThrows(JavaQName e)
          Adds an exception to this methods list of exceptions.
 void addThrows(java.lang.String e)
          Deprecated. Use addThrows(JavaQName)
 void clearParams()
          Clears the list of parameters.
 JavaQName[] getExceptions()
          Returns the list of exceptions thrown by this method.
 Parameter[] getParams()
          Returns the list of parameters that this method takes.
 boolean isThrowing(java.lang.Class e)
          Returns whether the method is throwing the given exception.
 boolean isThrowing(JavaQName e)
          Returns whether the method is throwing the given exception.
 
Methods inherited from class net.sf.jaxme.js.ConditionalIndentationJavaSourceObject
addBreak, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCase, addCatch, addCatch, addCatch, addCatch, addDefault, addElse, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addElseIf, addEndFor, addEndIf, addEndSwitch, addEndTry, addEndWhile, addFinally, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addFor, addForArray, addForArray, addForArray, addForArray, addForArray, addForArray, addForCollection, addForCollection, addForCollection, addForCollection, addForCollection, addForCollection, addForEnumeration, addForEnumeration, addForEnumeration, addForEnumeration, addForEnumeration, addForEnumeration, addForIterator, addForIterator, addForIterator, addForIterator, addForIterator, addForIterator, addForList, addForList, addForList, addForList, addForList, addForList, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addIf, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addSwitch, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addThrowNew, addTry, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhile, addWhileIterator, getLocalVariableName, newJavaField, newJavaField, newJavaField, newJavaField, write, write, writeHeader
 
Methods inherited from class net.sf.jaxme.js.JavaSourceObject
getComment, getJavaSource, getName, getProtection, getType, isAbstract, isFinal, isStatic, newComment, setAbstract, setFinal, setJavaSource, setName, setProtection, setStatic, setType
 
Methods inherited from class net.sf.jaxme.js.IndentationEngineImpl
addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, asString, checkNulls, clear, getLevel, getLines, getLines, getPlaceHolder, indent, isEmpty, moveToBottom, moveToTop, newPlaceHolder, removePlaceHolder, setLevel, unindent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jaxme.js.IndentationEngine
addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, addLine, clear, getLevel, getPlaceHolder, indent, moveToBottom, moveToTop, newPlaceHolder, setLevel, unindent
 

Constructor Detail

AbstractJavaMethod

public AbstractJavaMethod(java.lang.String pName,
                          JavaQName pType,
                          JavaSource.Protection pProtection)
Method Detail

isThrowing

public boolean isThrowing(JavaQName e)

Returns whether the method is throwing the given exception. Note that this method doesn't care for inheritance. For example, if the method declares to be throwing an IOException, then the value isThrowing(java.net.MalformedURLException.class) is still false.


isThrowing

public boolean isThrowing(java.lang.Class e)

Returns whether the method is throwing the given exception. Note that this method doesn't care for inheritance. For example, if the method declares to be throwing an IOException, then the value isThrowing(java.net.MalformedURLException.class) is still false.


addThrows

public void addThrows(JavaQName e)

Adds an exception to this methods list of exceptions.

See Also:
getExceptions()

addThrows

public void addThrows(java.lang.Class e)

Adds an exception to this methods list of exceptions.

See Also:
getExceptions()

addThrows

public void addThrows(java.lang.String e)
Deprecated. Use addThrows(JavaQName)

Adds an exception to this methods list of exceptions.

See Also:
getExceptions()

addParam

public void addParam(java.lang.String p)
Deprecated. Use addParam(JavaQName, String)

Adds a parameter that this method takes.

See Also:
getParams()

addParam

public void addParam(java.lang.String p,
                     java.lang.String v)
Deprecated. Use addParam(JavaQName, String)

Adds a parameter that this method takes.

See Also:
getParams()

addParam

public DirectAccessible addParam(java.lang.Class p,
                                 java.lang.String v)

Adds a parameter that this method takes.

Returns:
An object to use for referencing the parameter inside the method.
See Also:
getParams()

addParam

public DirectAccessible addParam(JavaQName pType,
                                 java.lang.String pName)

Adds a parameter that this method takes.

Returns:
An object to use for referencing the parameter inside the method.
See Also:
getParams()

addParam

public DirectAccessible addParam(Parameter pParam)

Adds a parameter that this method takes.

Returns:
An object to use for referencing the parameter inside the method.
See Also:
getParams()

clearParams

public void clearParams()

Clears the list of parameters.


getExceptions

public JavaQName[] getExceptions()

Returns the list of exceptions thrown by this method.

See Also:
addThrows(JavaQName)

getParams

public Parameter[] getParams()

Returns the list of parameters that this method takes. Any element in the list is an instance of Parameter.

See Also:
addParam(JavaQName, String)