|
|||||||||
| Home >> All >> org >> cantaloop >> cgimlet >> lang >> [ java overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.cantaloop.cgimlet.lang.java
Class JClassTemplate

java.lang.Objectorg.cantaloop.cgimlet.lang.java.AbstractTemplate
org.cantaloop.cgimlet.lang.java.JClassTemplate
- All Implemented Interfaces:
- org.cantaloop.cgimlet.lang.ClassTemplate, org.cantaloop.cgimlet.lang.Template
- Direct Known Subclasses:
- MemberClassTemplate
- public class JClassTemplate
- extends AbstractTemplate
- implements org.cantaloop.cgimlet.lang.ClassTemplate
- extends AbstractTemplate
This template that can be used to generate a class.
- Version:
- @version@ ($Revision: 1.4 $)
| Field Summary | |
protected java.util.Set |
m_constructors
|
protected java.util.Set |
m_fields
|
protected java.util.Set |
m_ifaces
|
protected java.util.Set |
m_imports
|
protected java.util.Set |
m_memberClasses
|
protected java.util.Set |
m_methods
|
protected java.lang.String |
m_parent
|
protected java.lang.String |
m_pkg
|
| Fields inherited from class org.cantaloop.cgimlet.lang.java.AbstractTemplate |
DESCR, m_modifier, m_name, UTILS |
| Constructor Summary | |
JClassTemplate(java.lang.String pkg,
java.lang.String name)
|
|
| Method Summary | |
org.cantaloop.cgimlet.lang.ConstructorTemplate |
addConstructor()
Creates a constructor for this class |
void |
addField(org.cantaloop.cgimlet.lang.FieldTemplate f)
Adds a field. |
void |
addImport(java.lang.String name)
Adds a class or a package that should be imported. |
void |
addInterface(java.lang.String iface)
Adds the (fully qualified) name of a interface to the list of interfaces this class implements. |
MemberClassTemplate |
addMemberClass(java.lang.String name,
org.cantaloop.cgimlet.lang.Modifier m)
|
void |
addMethod(org.cantaloop.cgimlet.lang.MethodTemplate m)
Adds a method. |
java.lang.String |
getCode()
Returns the code for this template. |
java.lang.String |
getFullyQualifiedName()
Get the fully qualified name of the class |
private java.lang.String |
getHeaderComment()
Returns the documentation string that should be prepended to every generated class. |
java.lang.String |
getPackage()
Get the package the class is contained in. |
protected void |
internGetClassDeclaration(java.lang.StringBuffer sb)
Returns the declaration of the class. |
void |
setParent(java.lang.String parent)
Sets the name of the parent class (you must specify the fully qualified name if it is not in the same package). |
| Methods inherited from class org.cantaloop.cgimlet.lang.java.AbstractTemplate |
getModifier, getName, setModifier |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.cantaloop.cgimlet.lang.ClassTemplate |
getName |
| Field Detail |
m_parent
protected java.lang.String m_parent
m_pkg
protected java.lang.String m_pkg
m_ifaces
protected java.util.Set m_ifaces
m_imports
protected java.util.Set m_imports
m_fields
protected java.util.Set m_fields
m_methods
protected java.util.Set m_methods
m_constructors
protected java.util.Set m_constructors
m_memberClasses
protected java.util.Set m_memberClasses
| Constructor Detail |
JClassTemplate
public JClassTemplate(java.lang.String pkg, java.lang.String name)
| Method Detail |
getFullyQualifiedName
public java.lang.String getFullyQualifiedName()
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Get the fully qualified name of the class
- Specified by:
getFullyQualifiedNamein interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
setParent
public void setParent(java.lang.String parent)
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Sets the name of the parent class (you must specify
the fully qualified name if it is not in the same package).
- Specified by:
setParentin interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
getPackage
public java.lang.String getPackage()
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Get the package the class is contained in.
- Specified by:
getPackagein interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
addInterface
public void addInterface(java.lang.String iface)
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Adds the (fully qualified) name of a interface
to the list of interfaces this class implements.
- Specified by:
addInterfacein interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
addImport
public void addImport(java.lang.String name)
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Adds a class or a package that should be imported.
- Specified by:
addImportin interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
addField
public void addField(org.cantaloop.cgimlet.lang.FieldTemplate f)
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Adds a field.
- Specified by:
addFieldin interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
addMethod
public void addMethod(org.cantaloop.cgimlet.lang.MethodTemplate m)
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Adds a method.
- Specified by:
addMethodin interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
addConstructor
public org.cantaloop.cgimlet.lang.ConstructorTemplate addConstructor()
- Description copied from interface:
org.cantaloop.cgimlet.lang.ClassTemplate - Creates a constructor for this class
- Specified by:
addConstructorin interfaceorg.cantaloop.cgimlet.lang.ClassTemplate
addMemberClass
public MemberClassTemplate addMemberClass(java.lang.String name, org.cantaloop.cgimlet.lang.Modifier m)
getHeaderComment
private java.lang.String getHeaderComment()
- Returns the documentation string that should be prepended
to every generated class.
getCode
public java.lang.String getCode()
- Description copied from interface:
org.cantaloop.cgimlet.lang.Template - Returns the code for this template.
- Specified by:
getCodein interfaceorg.cantaloop.cgimlet.lang.Template
internGetClassDeclaration
protected void internGetClassDeclaration(java.lang.StringBuffer sb)
- Returns the declaration of the class. The declaration of a class
is the access modifier, other modifiers like final or static
and the name of the class. Subclasses may override this method.
|
|||||||||
| Home >> All >> org >> cantaloop >> cgimlet >> lang >> [ java overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC