@Retention(value=RUNTIME) @Target(value={TYPE,FIELD}) @Documented public @interface XStreamConverter
Mapper
: The current mapper chain of the XStream
instance.ClassLoader
: The class loader used by the XStream instance to deserialize the
objects.ReflectionProvider
: The reflection
provider used by the reflection based converters of the current XStream instance.ConverterLookup
: The lookup for converters
handling a special type.JVM
: Utility e.g. to load classes.Class
: The type of the element where the annotation is declared. Note, that this
argument is not supported when using
XStreamConverters
.The algorithm will try the converter's constructor with the most arguments first.
Note, the annotation matches a ConverterMatcher
.
ConverterMatcher
as well as
SingleValueConverter
extend this interface. The
AnnotationMapper
can only handle these two
known types.
Modifier and Type | Required Element and Description |
---|---|
Class<? extends ConverterMatcher> |
value |
Modifier and Type | Optional Element and Description |
---|---|
boolean[] |
booleans |
byte[] |
bytes |
char[] |
chars |
double[] |
doubles |
float[] |
floats |
int[] |
ints |
long[] |
longs |
int |
priority |
short[] |
shorts |
String[] |
strings |
Class<?>[] |
types
Provide class types as arguments for the converter's constructor arguments.
|
public abstract Class<? extends ConverterMatcher> value
public abstract int priority
public abstract Class<?>[] types
Note, that XStream itself provides the current class type as first Class argument to
a constructor, if the annotation is added directly to a class type (and not as part of a
parameter declaration of a XStreamConverters
annotation). The current type has
precedence over any type provided with this method.
public abstract String[] strings
public abstract byte[] bytes
public abstract char[] chars
public abstract short[] shorts
public abstract int[] ints
public abstract long[] longs
public abstract float[] floats
public abstract double[] doubles
public abstract boolean[] booleans
Copyright © 2004–2013 XStream. All rights reserved.