|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.io.xpp3.Xpp3Helper
public class Xpp3Helper
A Helper to read some data stored in xml with a Xpp3Reader.
In this class, there is some methods to obtain a discovered Xpp3Reader
registred by a ServiceLoader mecanism.
Xpp3Reader| Field Summary | |
|---|---|
protected static Map<Class<?>,Xpp3Reader<?>> |
readers
les readers enregistres via un ServiceLoader
sur le contrat Xpp3Reader. |
| Constructor Summary | |
|---|---|
Xpp3Helper()
|
|
| Method Summary | ||
|---|---|---|
static void |
addAttributeValueMappers(Class<?> containerType,
DataConverter type,
boolean onlyOne,
Map<String,PropertyMapper> allMappers,
String... tagNames)
|
|
static void |
addDefaultEntities(org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
Add to the parser, the default replacers for all single characters from the XHTML specification. |
|
protected static void |
addMappers(Class<? extends PropertyMapper> mapperClass,
Class<?> containerType,
DataConverter type,
boolean onlyOne,
Map<String,PropertyMapper> allMappers,
String... tagNames)
|
|
static void |
addTagTextContentMappers(Class<?> containerType,
DataConverter type,
boolean onlyOne,
Map<String,PropertyMapper> allMappers,
String... tagNames)
|
|
static void |
clearReaders()
Clean all the registred readers. |
|
static
|
getReader(Class<T> klass)
Obtain the loaded reader which match his Xpp3Reader.getType() whith
the given type. |
|
static Iterator<Xpp3Reader<?>> |
getReaderItetator()
|
|
protected static Map<Class<?>,Xpp3Reader<?>> |
getReaders()
Load (if readers is null the readers via a
ServiceLoader of contract Xpp3Reader and returns
the dictionnary of discovered associated to their type
(Xpp3Reader.getType()). |
|
static
|
readObject(Class<O> klass,
Reader reader)
Read a single object from a xml stream. |
|
static
|
readObjects(Class<O> klass,
Reader reader)
Read an array of objects from a xml stream. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Map<Class<?>,Xpp3Reader<?>> readers
ServiceLoader
sur le contrat Xpp3Reader.
| Constructor Detail |
|---|
public Xpp3Helper()
| Method Detail |
|---|
public static <O> O readObject(Class<O> klass,
Reader reader)
throws IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
O - the type of object to readklass - the type of object to readreader - the reader where to parse the xml
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pb
public static <O> O[] readObjects(Class<O> klass,
Reader reader)
throws IOException,
org.codehaus.plexus.util.xml.pull.XmlPullParserException
O - the type of objects to returnklass - the type of object to readreader - the reader where to parse the xml
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pbpublic static Iterator<Xpp3Reader<?>> getReaderItetator()
Xpp3Reader.public static <T> Xpp3Reader<T> getReader(Class<T> klass)
Xpp3Reader.getType() whith
the given type.
T - the type of the data which should be parsed by the researched parserklass - the type of the data which should be parsed by the researched parser
public static void clearReaders()
getReader(java.lang.Class).
public static void addDefaultEntities(org.codehaus.plexus.util.xml.pull.XmlPullParser parser)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
parser - the parser to configure
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any pb
public static void addTagTextContentMappers(Class<?> containerType,
DataConverter type,
boolean onlyOne,
Map<String,PropertyMapper> allMappers,
String... tagNames)
throws IntrospectionException
IntrospectionException
public static void addAttributeValueMappers(Class<?> containerType,
DataConverter type,
boolean onlyOne,
Map<String,PropertyMapper> allMappers,
String... tagNames)
throws IntrospectionException
IntrospectionException
protected static void addMappers(Class<? extends PropertyMapper> mapperClass,
Class<?> containerType,
DataConverter type,
boolean onlyOne,
Map<String,PropertyMapper> allMappers,
String... tagNames)
throws IntrospectionException,
NoSuchMethodException,
InstantiationException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
IntrospectionException
NoSuchMethodException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetExceptionprotected static Map<Class<?>,Xpp3Reader<?>> getReaders()
readers is null the readers via a
ServiceLoader of contract Xpp3Reader and returns
the dictionnary of discovered associated to their type
(Xpp3Reader.getType()).
Xpp3Reader registred via a ServiceLoader
on the contract Xpp3Reader associated to their type
(Xpp3Reader.getType()).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||