|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jzos.recordgen.asm.RecordClassGenerator
public class RecordClassGenerator
Generates the source code for a Java class that maps a byte array matching the description given by an Assembler CSECT or DSECT. The input to this process is an ADATA file created by the IBM High-level Assembler.
See the sample JCL member "DSECTGEN" for example JCL for executing the assembler and converting the ADATA output to a Java source file.
for information on running this class
Constructor Summary | |
---|---|
RecordClassGenerator(RecordSpec recordSpec)
Construct an instance with a given RecordSpec |
Method Summary | |
---|---|
protected void |
genConstant(ConstantSpec constantSpec)
|
protected void |
genConstructors()
|
void |
generateJavaSourceOn(java.io.Writer writer)
Generate Java source to the given Writer. |
protected void |
genHeader()
|
protected void |
genInstanceVariable(FieldSpec fieldSpec)
|
protected void |
genInstanceVariables()
|
protected void |
genSettersAndGetter(FieldSpec fieldSpec)
|
protected void |
genSettersAndGetters()
|
protected void |
genSourceLineComments(ElementSpec spec)
|
protected void |
genStaticFieldDeclaration(java.lang.String javaName,
FieldSpec fieldSpec)
|
protected void |
genStaticFieldLayout()
|
protected void |
genStaticFieldLayout(FieldSpec fieldSpec)
|
protected void |
genTrailer()
|
java.lang.String |
getClassName()
Answer the unqualified Java class name that is generated |
protected java.lang.String |
getInstanceJavaName(java.lang.String label,
int index,
boolean upperFirst)
|
java.lang.String |
getPackageName()
Answer the Java package name for the generated Class. |
protected java.lang.String |
getStaticJavaName(java.lang.String label,
int index)
|
boolean |
isGenSetters()
Answer whether Java "set" methods should be generated for generated fields. |
boolean |
isUseBufOffset()
Answer whether generated Java source code will include buffer offsets into the underlying byte array. |
static void |
main(java.lang.String[] args)
Main method / driver for generating Java Classes from Assembler ADATA files. |
void |
setClassName(java.lang.String className)
|
void |
setGenSetters(boolean genSetters)
|
void |
setPackageName(java.lang.String packageName)
|
void |
setUseBufOffset(boolean useBufOffset)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RecordClassGenerator(RecordSpec recordSpec)
recordSpec
- the RecordSpecMethod Detail |
---|
public static void main(java.lang.String[] args) throws java.io.IOException
Arguments consist of the following optional "name=value" pairs:
args
- key=value strings as described above.
java.io.IOException
public void generateJavaSourceOn(java.io.Writer writer) throws java.io.IOException
writer
-
java.io.IOException
public java.lang.String getClassName()
public void setClassName(java.lang.String className)
Object.getClass()
public java.lang.String getPackageName()
public void setPackageName(java.lang.String packageName)
getPackageName()
public boolean isGenSetters()
public void setGenSetters(boolean genSetters)
isGenSetters()
public boolean isUseBufOffset()
public void setUseBufOffset(boolean useBufOffset)
isUseBufOffset()
protected void genConstant(ConstantSpec constantSpec) throws java.io.IOException
java.io.IOException
protected void genConstructors() throws java.io.IOException
java.io.IOException
protected void genHeader() throws java.io.IOException
java.io.IOException
protected void genInstanceVariable(FieldSpec fieldSpec) throws java.io.IOException
java.io.IOException
protected void genInstanceVariables() throws java.io.IOException
java.io.IOException
protected void genSettersAndGetter(FieldSpec fieldSpec) throws java.io.IOException
java.io.IOException
protected void genSettersAndGetters() throws java.io.IOException
java.io.IOException
protected void genSourceLineComments(ElementSpec spec) throws java.io.IOException
java.io.IOException
protected void genStaticFieldDeclaration(java.lang.String javaName, FieldSpec fieldSpec) throws java.io.IOException
java.io.IOException
protected void genStaticFieldLayout() throws java.io.IOException
java.io.IOException
protected void genStaticFieldLayout(FieldSpec fieldSpec) throws java.io.IOException
java.io.IOException
protected void genTrailer() throws java.io.IOException
java.io.IOException
protected java.lang.String getInstanceJavaName(java.lang.String label, int index, boolean upperFirst)
protected java.lang.String getStaticJavaName(java.lang.String label, int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |