org.enhydra.xml.xmlc.codegen
Class JavaMethod
java.lang.Object
|
+--org.enhydra.xml.xmlc.codegen.JavaMethod
- public final class JavaMethod
- extends Object
Object that is used to assemble the Java source for a method.
Field Summary |
protected int |
fModifiers
Modifiers of the method |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fModifiers
protected int fModifiers
- Modifiers of the method
JavaMethod
public JavaMethod(String name,
String returnType,
int modifiers,
JavaParameter[] parameters,
String[] doc)
- Constructor.
- Parameters:
returnType
- The type the method returns. Specify null for a
constructor.name
- The name of the method. If name is null, then this
creates a static initializer.parameters
- A array describing the parameters; null or empty if
no parameters.modifiers
- The method modifier bit set.doc
- The documentation to include. The parameter documentation
will be appended to this, so should not be repeated.
Each row of the array is a line of documentation.
getCode
public JavaCode getCode()
- Get the code object associate with the method body.
getName
public String getName()
- Get the name.
getReturnType
public String getReturnType()
- Get the return type.
getModifiers
public int getModifiers()
- Get the modifiers.
printMethodSignature
public void printMethodSignature(IndentWriter out,
boolean beginBody)
- Print the method signature. This is public, since it used in
generating method listings as well as code.
- Parameters:
out
- Write to this stream.beginBody
- If true, start a method body, otherwise end with
a semicolon.
print
public void print(IndentWriter out,
boolean printBody)
- Print the method.
Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.