|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.legstar.codegen.CodeGenHelper
public class CodeGenHelper
Provides the generator with convenience methods. The class can be passed as an instance to the velocity engine and used by templates.
Constructor Summary | |
---|---|
CodeGenHelper()
|
Method Summary | |
---|---|
String |
getClassName(String qualClassName)
Get the simple class name from a fully qualified class name. |
String |
getPackageName(String qualClassName,
String defaultPackageName)
Determines the package name of a fully qualified class name. |
String |
getQualClassName(String packageName,
String className)
Get a fully qualified class name. |
boolean |
isEmpty(String str)
Checks a string for emptiness. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CodeGenHelper()
Method Detail |
---|
public boolean isEmpty(String str)
str
- the string to check
public String getPackageName(String qualClassName, String defaultPackageName)
qualClassName
- class name including packagedefaultPackageName
- a default to return if class is not qualified
public String getClassName(String qualClassName)
qualClassName
- class name including package
public String getQualClassName(String packageName, String className)
packageName
- the package or null if noneclassName
- the class name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |