|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ca.quine.jcommons.sourcegen.ClassSource
Constructor Summary | |
ClassSource(boolean isPublic,
String name)
Constructs a new ClassSource object (which represents a class). |
Method Summary | |
void |
addField(FieldSource field)
|
void |
addMethod(MethodSource method)
|
void |
addProperty(String type,
String name)
Create a new private field of type type with name
name and create and accessor and mutator method for it. |
CommentSource |
getComment()
|
Iterator |
getFieldIterator()
Returns an Iterator of FieldSource objects. |
int |
getModifiers()
See the public static finals on Modifier . |
String |
getName()
|
String |
getSuperClass()
|
boolean |
isPublic()
Returns true if and only if this class represents the public class in a Java source file. |
void |
output(FormattingRules rules,
StringBuffer buffer)
Formats and outputs this class (with the given FormattingRules ) into the given
StringBuffer . |
void |
setComment(JavaDocCommentSource commentSource)
|
void |
setImplements(ArrayList interfaces)
Sets the given ArrayList of String
objects as the interfaces that this class implements. |
void |
setImplements(String interfaceName)
Sets the given interface as the only one this class implements. |
void |
setModifiers(int modifiers)
See the public static finals on Modifier . |
void |
setSuperClass(String superClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassSource(boolean isPublic, String name)
isPublic
- Pass "true" if this class is the public class in a
source file, false otherwise.Method Detail |
public void setModifiers(int modifiers)
Modifier
.
modifiers
- public int getModifiers()
Modifier
.
public void addField(FieldSource field)
public void addMethod(MethodSource method)
public void addProperty(String type, String name)
type
with name
name
and create and accessor and mutator method for it.
type
- name
- public void setImplements(String interfaceName)
interfaceName
- public void setImplements(ArrayList interfaces)
ArrayList
of String
objects as the interfaces that this class implements.
interfaces
- public void output(FormattingRules rules, StringBuffer buffer)
FormattingRules
) into the given
StringBuffer
.
rules
- buffer
- public boolean isPublic()
public Iterator getFieldIterator()
public String getName()
public String getSuperClass()
public void setSuperClass(String superClass)
public void setComment(JavaDocCommentSource commentSource)
public CommentSource getComment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |