|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.classfile.TypeReference
edu.rit.classfile.ArrayOrClassReference
edu.rit.classfile.ClassReference
edu.rit.classfile.ClassDescription
edu.rit.classfile.SynthesizedClassOrInterfaceDescription
edu.rit.classfile.SynthesizedClassDescription
public class SynthesizedClassDescription
Class SynthesizedClassDescription is used to synthesize a class description for some actual class. This lets a program synthesize a class directly, instead of having to generate Java source and run the Java compiler. To synthesize a class:
setPublic()
, setRegularClass()
,
setFinalClass()
, setAbstractClass()
.
addSuperinterface()
.
SynthesizedClassConstantFieldDescription
, SynthesizedClassFieldDescription
.
SynthesizedConstructorDescription
, SynthesizedMethodDescription
, SynthesizedAbstractMethodDescription
, SynthesizedClassInitializerDescription
.
emit()
.
In the documentation below, the term "described class" means "the class described by this class description object."
To synthesize a class description for an interface, see class SynthesizedInterfaceDescription
.
Constructor Summary | |
---|---|
SynthesizedClassDescription(String theClassName)
Construct a synthesized class description for an actual class with the given name whose superclass is "java.lang.Object". |
|
SynthesizedClassDescription(String theClassName,
ClassReference theSuperclass)
Construct a synthesized class description for an actual class with the given name and the given superclass. |
Method Summary | |
---|---|
void |
setAbstractClass()
Specify that the described class is an abstract class. |
void |
setFinalClass()
Specify that the described class is a final class. |
void |
setRegularClass()
Specify that the described class is a non-final non-abstract class. |
Methods inherited from class edu.rit.classfile.SynthesizedClassOrInterfaceDescription |
---|
addSuperinterface, emit, setPublic |
Methods inherited from class edu.rit.classfile.ClassDescription |
---|
getFields, getSubroutines, getSuperclass, getSuperinterfaces, isAbstract, isFinal, isInterface, isPublic |
Methods inherited from class edu.rit.classfile.ClassReference |
---|
getClassName, getSimpleName |
Methods inherited from class edu.rit.classfile.ArrayOrClassReference |
---|
getClassInternalName |
Methods inherited from class edu.rit.classfile.TypeReference |
---|
equals, getTypeDescriptor, getWordCount, hashCode, read, toString, write |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynthesizedClassDescription(String theClassName)
theClassName
- Described class's fully-qualified name. The fully qualified class
name uses periods, for example: "com.foo.Bar".
NullPointerException
- (unchecked exception) Thrown if theClassName is null.
IllegalArgumentException
- (unchecked exception) Thrown if theClassName is zero length.public SynthesizedClassDescription(String theClassName, ClassReference theSuperclass)
theClassName
- Described class's fully-qualified name. The fully qualified class
name uses periods, for example: "com.foo.Bar".theSuperclass
- Described class's superclass.
NullPointerException
- (unchecked exception) Thrown if theClassName is null or
theSuperclass is null.
IllegalArgumentException
- (unchecked exception) Thrown if theClassName is zero length.Method Detail |
---|
public void setRegularClass()
public void setFinalClass()
public void setAbstractClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |