public class JavaCodeBuilder extends Object
Constructor and Description |
---|
JavaCodeBuilder() |
Modifier and Type | Method and Description |
---|---|
JavaCodeBuilder |
addImport(Class<?> importClass)
Add an import for an individual class.
|
JavaCodeBuilder |
addImport(Class<?> importClass,
boolean allClassesInPackage)
Add an import for an individual class or all all classes in the specified class' package (if
allClassesInPackage is true). |
JavaCodeBuilder |
addImport(String packageOrClass)
Add an import for a package, package wildcard, or individual class.
|
String |
createVariable(String variable) |
Set<String> |
getImports() |
String |
getPackage() |
String |
getSource() |
CodeWriter |
getSourceWriter() |
JavaCodeBuilder |
setPackage(String packageName) |
public String getPackage()
public JavaCodeBuilder setPackage(String packageName)
public JavaCodeBuilder addImport(String packageOrClass)
public JavaCodeBuilder addImport(Class<?> importClass)
public JavaCodeBuilder addImport(Class<?> importClass, boolean allClassesInPackage)
allClassesInPackage
is true).public CodeWriter getSourceWriter()
public String getSource()
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.