Package org.simpleframework.xml.core
Class OverrideType
java.lang.Object
org.simpleframework.xml.core.OverrideType
- All Implemented Interfaces:
Type
The
OverrideType
is used to represent a type as class
other than that defined in a containing type. This can be used to
ensure that a union type does not have to have an attribute
defining its type serialized in to the resulting XML.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOverrideType
(Type type, Class override) Constructor for theOverrideType
object. -
Method Summary
Modifier and TypeMethodDescription<T extends Annotation>
TgetAnnotation
(Class<T> label) This is the annotation associated with the method or field that has been annotated.getType()
This will provide the method or field type.toString()
This is used to describe the type as it exists within the owning class.
-
Field Details
-
override
This is the override that is used to represent the type. -
type
This is the type associated with this override type.
-
-
Constructor Details
-
OverrideType
Constructor for theOverrideType
object. This is used to create a type object that has an override type which is can be used to ensure serialization does not require any extra data containing the class name of the type instance.- Parameters:
type
- this is the type used internally for thisoverride
- this is the override type to use
-
-
Method Details
-
getAnnotation
This is the annotation associated with the method or field that has been annotated. If this represents an entry to a Java collection such as ajava.util.List
then this will return null for any annotation requested.- Specified by:
getAnnotation
in interfaceType
- Parameters:
label
- this is the type of the annotation to acquire- Returns:
- this provides the annotation associated with this
-
getType
This will provide the method or field type. The type is the class that is to be read and written on the object. Typically the type will be a serializable object or a primitive type. -
toString
This is used to describe the type as it exists within the owning class. This is used to provide error messages that can be used to debug issues that occur when processing.
-