Class TemplateHelper
java.lang.Object
org.exolab.castor.builder.printing.TemplateHelper
Helper class that provides convenience methods used
by Velocity templates during
JClass
printing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTakes a comment string and splits it into lines that have the maximum length of 70 chars,boolean
Returns true if theJClass
instance is instance of JEnum.printAnnotation
(JAnnotation annotation, String shift) Converts the givenJAnnotation
to a string representation.removeLineBreaks
(String string) Removes all line breaks from a given string.
-
Constructor Details
-
TemplateHelper
public TemplateHelper()
-
-
Method Details
-
removeLineBreaks
Removes all line breaks from a given string.- Parameters:
string
- The string containing line breaks.- Returns:
- A string without line breaks.
-
getLines
Takes a comment string and splits it into lines that have the maximum length of 70 chars,- Parameters:
comment
- The comment as string.- Returns:
- The comment string splitted into a list.
-
isEnum
Returns true if theJClass
instance is instance of JEnum.- Parameters:
jClass
- TheJClass
instance to check.- Returns:
- true if instance of JEnum.
-
printAnnotation
Converts the givenJAnnotation
to a string representation.- Parameters:
annotation
- The annotation to translate.shift
- The intent.- Returns:
- A string representation of the annotation.
-