jaxx.compiler.java
Class JavaFile
java.lang.Object
jaxx.compiler.java.JavaElement
jaxx.compiler.java.JavaFile
public class JavaFile
- extends JavaElement
A Java source file being generated for output. Once the class is completely initialized, use the
Object.toString() method to generate source code for it.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GETTER_PATTERN
protected static final String GETTER_PATTERN
- See Also:
- Constant Field Values
BOOLEAN_GETTER_PATTERN
protected static final String BOOLEAN_GETTER_PATTERN
- See Also:
- Constant Field Values
SETTER_PATTERN
protected static final String SETTER_PATTERN
- See Also:
- Constant Field Values
getPackageName
public String getPackageName()
getImportManager
public org.nuiton.eugene.java.extension.ImportsManager getImportManager()
getImports
public String[] getImports()
getImportsList
public List<String> getImportsList()
getSuperClass
public String getSuperClass()
getInterfaces
public List<String> getInterfaces()
getMethods
public List<JavaMethod> getMethods()
getFields
public List<JavaField> getFields()
isAbstractClass
public boolean isAbstractClass()
getGenericType
public String getGenericType()
getInnerClasses
public List<JavaFile> getInnerClasses()
getRawBodyCode
public StringBuilder getRawBodyCode()
getSuperGenericType
public String getSuperGenericType()
isSuperclassIsJAXXObject
public boolean isSuperclassIsJAXXObject()
getSimpleName
public String getSimpleName()
getField
public JavaField getField(String componentId)
addImport
public void addImport(String importString)
addImport
public void addImport(Class<?> importString)
setImports
public void setImports(Collection<String> imports)
setGenericType
public void setGenericType(String genericType)
setSuperClass
public void setSuperClass(String superClass)
addInterface
public void addInterface(String... canonicalNames)
setInterfaces
public void setInterfaces(List<String> interfaces)
addConstructor
public void addConstructor(JavaConstructor constructor)
addMethod
public void addMethod(JavaMethod method)
addField
public void addField(JavaField field)
addGetterMethod
public JavaMethod addGetterMethod(String id,
int modifiers,
String type,
boolean overridde,
boolean useOverride)
addField
public void addField(JavaField field,
boolean javaBean)
addSimpleField
public void addSimpleField(JavaField field)
setSuperclassIsJAXXObject
public void setSuperclassIsJAXXObject(boolean superclassIsJAXXObject)
setAbstractClass
public void setAbstractClass(boolean abstractClass)
setSuperGenericType
public void setSuperGenericType(String superGenericType)
addBodyCode
public void addBodyCode(String bodyCode)
simplifyCode
public String simplifyCode(String pattern,
String... types)
- Try to use a simple type fro the given
type and apply it on the
given pattern.
Example :
type = java.io.File, pattern = new %s("");
returns : new File("") or new java.io.File("") if importManager can
not import java.io.File
- Parameters:
types - the types to simplifypattern - the pattern where to apply simple types
- Returns:
- the input pattern with most simplest types
- Since:
- 2.4
clear
public void clear()
getConstructors
public List<JavaConstructor> getConstructors()
setSimpleName
public void setSimpleName(String simpleName)
Copyright © 2008-2011 CodeLutin. All Rights Reserved.