|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.exolab.javasource.JType
org.exolab.javasource.JStructure
org.exolab.javasource.AbstractJClass
org.exolab.javasource.JClass
public class JClass
A representation of the Java Source code for a Java Class. This is a useful utility when creating in memory source code. This package was modelled after the Java Reflection API as much as possible to reduce the learning curve.
| Field Summary |
|---|
| Fields inherited from class org.exolab.javasource.JType |
|---|
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, SHORT |
| Constructor Summary | |
|---|---|
JClass(java.lang.String name)
Creates a new JClass with the given name. |
|
| Method Summary | |
|---|---|
void |
addImport(java.lang.String className)
Adds the given import to this JStructure. |
void |
addMember(JMember jMember)
Adds the given JMember to this JStructure. |
void |
changeLocalName(java.lang.String localName)
Changes the local name of this class type. |
JTypeName |
getSuperClass()
Returns the super class that this class extends. |
java.lang.String |
getSuperClassQualifiedName()
Returns the qualified name of the super class that this class extends. |
void |
print(JSourceWriter jsw,
boolean classOnly)
Deprecated. Please use the Velocity-template based approach instead. |
void |
setSuperClass(java.lang.String superClass)
Sets the super Class that this class extends. |
| Methods inherited from class org.exolab.javasource.JStructure |
|---|
addAnnotation, addImport, addImport, addImportInternal, addInterface, getAnnotatedElementHelper, getAnnotation, getAnnotations, getFilename, getHeader, getImportCount, getImports, getInterfaceCount, getInterfaces, getJDocComment, getModifiers, getPackageName, hasAnnotations, hasImport, isAnnotationPresent, print, printHeader, printImportDeclarations, printPackageDeclaration, removeAnnotation, removeImport, removeInterface, setHeader, toString |
| Methods inherited from class org.exolab.javasource.JType |
|---|
getLocalName, getName, isArray, isPrimitive, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JClass(java.lang.String name)
name - The name of the JClass to create.| Method Detail |
|---|
public final void addImport(java.lang.String className)
addImport in class JStructureclassName - Name of the class to import.public void addMember(JMember jMember)
addMember in class JStructurejMember - The JMember to add to this JStructure.public final JTypeName getSuperClass()
public final java.lang.String getSuperClassQualifiedName()
public final void setSuperClass(java.lang.String superClass)
superClass - The super Class that this Class extends.
public void print(JSourceWriter jsw,
boolean classOnly)
print in class AbstractJClassjsw - The JSourceWriter to print to. Must not be null.classOnly - If true, the file header, package declaration, and
imports are not printed.SourceGenerator.setJClassPrinterType(String)public void changeLocalName(java.lang.String localName)
localName - The new local name to be used.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||