Cantaloop CGimlet - API Documentation, Version: 0.2.0, Date: 2002-05-13 21:30 CEST

org.cantaloop.cgimlet.lang
Interface ClassTemplate

All Superinterfaces:
Template
All Known Implementing Classes:
JClassTemplate

public interface ClassTemplate
extends Template

This interface defines the requirements from which a class (or a similar top-level construct) can be generated.

Version:
0.2.0 ($Revision: 1.4 $)
Author:
Stefan Heimann

Method Summary
 ConstructorTemplate addConstructor()
          Creates a constructor for this class
 void addField(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.
 void addMethod(MethodTemplate m)
          Adds a method.
 java.lang.String getFullyQualifiedName()
          Get the fully qualified name of the class
 java.lang.String getName()
          Returns the simple name of the class
 java.lang.String getPackage()
          Get the package the class is contained in.
 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 interface org.cantaloop.cgimlet.lang.Template
getCode
 

Method Detail

getFullyQualifiedName

public java.lang.String getFullyQualifiedName()
Get the fully qualified name of the class

getName

public java.lang.String getName()
Returns the simple name of the class

setParent

public 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).

getPackage

public java.lang.String getPackage()
Get the package the class is contained in.

addInterface

public void addInterface(java.lang.String iface)
Adds the (fully qualified) name of a interface to the list of interfaces this class implements.
Parameters:
iface - a String value

addImport

public void addImport(java.lang.String name)
Adds a class or a package that should be imported.
Parameters:
pkg - a String value

addField

public void addField(FieldTemplate f)
Adds a field.
Parameters:
f - a FieldTemplate value

addMethod

public void addMethod(MethodTemplate m)
Adds a method.
Parameters:
m - a MethodTemplate value

addConstructor

public ConstructorTemplate addConstructor()
Creates a constructor for this class
Returns:
a ConstructorTemplate value

Copyright 2001, 2002 Stefan Heimann, David Leuschner. All rights reserved.