public class JavaClassGen extends JavaGen
Constructor and Description |
---|
JavaClassGen(java.lang.String classname,
java.lang.String packageName) |
JavaClassGen(java.lang.String classname,
java.lang.String packageName,
java.lang.String parentClass) |
JavaClassGen(java.lang.String classname,
java.lang.String packageName,
java.lang.String parentClass,
boolean isAbstract) |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultConstructor(boolean enabled) |
void |
addField(java.lang.String fieldName,
java.lang.String type) |
JavaMethodGen |
addGetter(java.lang.String varName,
java.lang.String varType)
convenience method to quickly add a standard getter for varName (assuming that varName is a field)
|
void |
addInterface(java.lang.String fqInterfaceName)
adds an interface the generated java class shall implement
|
JavaMethodGen |
addSetter(java.lang.String varName,
java.lang.String varType)
convenience method to quickly add a standard setter for varName (assuming that varName is a field)
|
AttributeTypeCodeGen<JavaMethodGen,JavaClassGen,?> |
getAttributeTypeCodeGen(CBOAttributeTypeI attrType,
java.lang.String attrName) |
addField, addField, addImport, addJavadocLine, addMethod, addMethod, addMethod, addMethod, getName, getPackage, getSource, isFieldDeclared, isMethodDeclared, isValidName, setClassComment
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSimpleName, getSimpleNames
public JavaClassGen(java.lang.String classname, java.lang.String packageName)
public JavaClassGen(java.lang.String classname, java.lang.String packageName, java.lang.String parentClass)
public JavaClassGen(java.lang.String classname, java.lang.String packageName, java.lang.String parentClass, boolean isAbstract)
public AttributeTypeCodeGen<JavaMethodGen,JavaClassGen,?> getAttributeTypeCodeGen(CBOAttributeTypeI attrType, java.lang.String attrName)
getAttributeTypeCodeGen
in interface SourceGeneratorI
getAttributeTypeCodeGen
in class JavaGen
public void addDefaultConstructor(boolean enabled)
public void addField(java.lang.String fieldName, java.lang.String type)
public JavaMethodGen addGetter(java.lang.String varName, java.lang.String varType)
varName
- varType
- public JavaMethodGen addSetter(java.lang.String varName, java.lang.String varType)
varName
- varType
- public void addInterface(java.lang.String fqInterfaceName)
fqInterfaceName
- the fully qualified name of the interfaceCopyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.