org.exolab.castor.builder.printing
Class TemplateHelper
java.lang.Objectorg.exolab.castor.builder.printing.TemplateHelper
public class TemplateHelper
extends java.lang.Object
Helper class that provides convenience methods used
by Velocity templates during
JClass printing.
ArrayList | getLines(String comment)- Takes a comment string and splits it into lines
that have the maximum length of 70 chars,
|
boolean | isEnum(JClass jClass)- Returns true if the
JClass instance is instance of JEnum.
|
String | printAnnotation(JAnnotation annotation, String shift)- Converts the given
JAnnotation to a string representation.
|
String | removeLineBreaks(String string)- Removes all line breaks from a given string.
|
getLines
public ArrayList getLines(String comment)
Takes a comment string and splits it into lines
that have the maximum length of 70 chars,
comment - The comment as string.
- The comment string splitted into a list.
isEnum
public boolean isEnum(JClass jClass)
Returns true if the
JClass instance is instance of JEnum.
jClass - The JClass instance to check.
- true if instance of JEnum.
printAnnotation
public String printAnnotation(JAnnotation annotation,
String shift) Converts the given
JAnnotation to a string representation.
annotation - The annotation to translate.shift - The intent.
- A string representation of the annotation.
removeLineBreaks
public String removeLineBreaks(String string)
Removes all line breaks from a given string.
string - The string containing line breaks.
- A string without line breaks.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com