Package org.simpleframework.xml.strategy
Interface Type
- All Known Subinterfaces:
Contact
- All Known Implementing Classes:
AttributeParameter.Contact
,ClassType
,ElementArrayParameter.Contact
,ElementListParameter.Contact
,ElementListUnionParameter.Contact
,ElementMapParameter.Contact
,ElementMapUnionParameter.Contact
,ElementParameter.Contact
,ElementUnionParameter.Contact
,FieldContact
,MethodContact
,OverrideType
,ParameterContact
,TextParameter.Contact
public interface Type
The
Type
interface is used to represent a method or
field that has been annotated for serialization. Representing
methods and fields as a generic type object allows various
common details to be extracted in a uniform way. It allows all
annotations on the method or field to be exposed. This can
also wrap classes that represent entries to a list or map.-
Method Summary
Modifier and TypeMethodDescription<T extends Annotation>
TgetAnnotation
(Class<T> type) 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.
-
Method Details
-
getType
Class 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.- Returns:
- this returns the type for this method o field
-
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.- Parameters:
type
- this is the type of the annotation to acquire- Returns:
- this provides the annotation associated with this
-
toString
String 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.
-