Class XmlLoader
- java.lang.Object
-
- net.sf.jasperreports.engine.xml.print.XmlLoader
-
public class XmlLoader extends Object
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_UNEXPECTED_ELEMENT
static String
EXCEPTION_MESSAGE_KEY_UNEXPECTED_END_ELEMENT
static String
EXCEPTION_MESSAGE_KEY_UNEXPECTED_EVENT_TYPE
static String
EXCEPTION_MESSAGE_KEY_UNEXPECTED_START_ELEMENT
-
Constructor Summary
Constructors Constructor Description XmlLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
endElement()
protected String
getAttribute(String name)
protected <T> T
getAttribute(String name, Function<String,T> transform)
protected Boolean
getBooleanAttribute(String name)
protected <E extends NamedEnum>
EgetEnumAttribute(String name, Function<String,E> getByName)
protected Float
getFloatAttribute(String name)
protected Integer
getIntAttribute(String name)
protected void
loadElements(Consumer<String> elementConsumer)
protected String
loadText(boolean trim)
void
open(InputStream is)
protected void
setAttribute(String name, Consumer<String> setter)
protected <T> void
setAttribute(String name, Function<String,T> transform, Consumer<T> setter)
protected void
setBooleanAttribute(String name, Consumer<Boolean> setter)
protected void
setColorAttribute(String name, Consumer<Color> setter)
protected <E extends NamedEnum>
voidsetEnumAttribute(String name, Function<String,E> getByName, Consumer<E> setter)
protected void
setFloatAttribute(String name, Consumer<Float> setter)
protected void
setIntAttribute(String name, Consumer<Integer> setter)
protected void
unexpectedElement(String element)
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_UNEXPECTED_ELEMENT
public static final String EXCEPTION_MESSAGE_KEY_UNEXPECTED_ELEMENT
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_UNEXPECTED_START_ELEMENT
public static final String EXCEPTION_MESSAGE_KEY_UNEXPECTED_START_ELEMENT
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_UNEXPECTED_END_ELEMENT
public static final String EXCEPTION_MESSAGE_KEY_UNEXPECTED_END_ELEMENT
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_UNEXPECTED_EVENT_TYPE
public static final String EXCEPTION_MESSAGE_KEY_UNEXPECTED_EVENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public void open(InputStream is) throws JRException
- Throws:
JRException
-
endElement
protected void endElement()
-
loadText
protected String loadText(boolean trim)
-
setAttribute
protected <T> void setAttribute(String name, Function<String,T> transform, Consumer<T> setter)
-
getEnumAttribute
protected <E extends NamedEnum> E getEnumAttribute(String name, Function<String,E> getByName)
-
setEnumAttribute
protected <E extends NamedEnum> void setEnumAttribute(String name, Function<String,E> getByName, Consumer<E> setter)
-
unexpectedElement
protected void unexpectedElement(String element)
-
-