org.codehaus.modello.plugin.java.javasource
public final class JInterface extends JStructure
Version: $Revision: 555 $ $Date: 2006-01-29 16:38:08 -0500 (Sun, 29 Jan 2006) $
Constructor Summary | |
---|---|
JInterface(String name)
Creates a new JInterface with the given name.
|
Method Summary | |
---|---|
void | addField(JField jField)
Adds the given JField to this JStructure.
|
void | addMember(JMember jMember)
Adds the given JMember to this JStructure.
|
void | addMethod(JMethodSignature jMethodSig)
Adds the given JMethodSignature to this JClass
|
JField | getField(String name)
Returns the field with the given name, or null if no field
was found with the given name.
|
JField[] | getFields()
Returns an array of all the JFields of this JStructure
|
JMethodSignature | getMethod(String name, int startIndex)
Returns the JMethodSignature with the given name,
and occuring at or after the given starting index.
|
JMethodSignature | getMethod(int index)
Returns the JMethodSignature at the given index.
|
JMethodSignature[] | getMethods()
Returns an array of all the JMethodSignatures of this JInterface.
|
void | print(JSourceWriter jsw)
Prints the source code for this JInterface to the given JSourceWriter
|
void | print(JSourceWriter jsw, boolean classOnly)
Prints the source code for this JInterface to the given JSourceWriter
|
Parameters: name the name of the JInterface.
Throws: java.lang.IllegalArgumentException when the given name is not a valid Class name.
This method is implemented by subclasses and should only accept the proper fields for the subclass otherwise an IllegalArgumentException will be thrown. For example a JInterface will only accept static fields.
Parameters: jField, the JField to add
Throws: java.lang.IllegalArgumentException when the given JField has a name of an existing JField
This method is implemented by subclasses and should only accept the proper types for the subclass otherwise an IllegalArgumentException will be thrown.
Parameters: jMember the JMember to add to this JStructure.
Throws: java.lang.IllegalArgumentException when the given JMember has the same name of an existing JField or JMethod respectively.
Parameters: jMethodSig the JMethodSignature to add.
Throws: java.lang.IllegalArgumentException when the given JMethodSignature conflicts with an existing method signature.
Parameters: name the name of the field to return.
Returns: the field with the given name, or null if no field was found with the given name.
Returns: an array of all the JFields of this JStructure
Parameters: name the name of the JMethodSignature to return. startIndex the starting index to begin searching from.
Returns: the JMethodSignature, or null if not found.
Parameters: index the index of the JMethodSignature to return.
Returns: the JMethodSignature at the given index.
Returns: an array of all the JMethodSignatures of this JInterface.
Parameters: jsw the JSourceWriter to print to. [May not be null]
Parameters: jsw the JSourceWriter to print to. [May not be null]