Package Summary  Overview Summary

method:getTypes() [CHANGED]

  • getTypes

    java.util.List<? extends TypeRef<T,C>> getTypes()
    Returns the information about the types allowed in this property.

    In a simple case like the following, an element property only has one TypeRef that points to String and tag name "foo".

     @XmlElement
     String abc;
     

    However, in a general case an element property can be heterogeneous, meaning you can put different types in it, each with a different tag name (and a few other settings.)

    
     // list can contain String or Integer.
     @XmlElements&#64;XmlElements({
       @XmlElement&#64;XmlElement(name="a",type=String.class),
       @XmlElement&#64;XmlElement(name="b",type=Integer.class),
     })
     List<Object> abc;
     
    

    In this case this method returns a list of two TypeRefs.

    Returns:
    Always non-null. Contains at least one entry. If isValueList()==true, there's always exactly one type.
  • getTypes

    java.util.List<? extends TypeRef<T,C>> getTypes()
    Returns the information about the types allowed in this property.

    In a simple case like the following, an element property only has one TypeRef that points to String and tag name "foo".

     @XmlElement
     String abc;
     

    However, in a general case an element property can be heterogeneous, meaning you can put different types in it, each with a different tag name (and a few other settings.)

     // list can contain String or Integer.
     @XmlElements({
       @XmlElement(name="a",type=String.class),
       @XmlElement(name="b",type=Integer.class),
     }) 
     List<Object> abc;
     
    

    In this case this method returns a list of two TypeRefs.

    Returns:
    Always non-null. Contains at least one entry. If isValueList()==true, there's always exactly one type.
  • getTypes

    java.util.List<? extends TypeRef<T,C>> getTypes()
    Returns the information about the types allowed in this property.

    In a simple case like the following, an element property only has one TypeRef that points to String and tag name "foo".

     @XmlElement
     String abc;
     

    However, in a general case an element property can be heterogeneous, meaning you can put different types in it, each with a different tag name (and a few other settings.)

    
     // list can contain String or Integer.
     &#64;XmlElements({
       &#64;XmlElement(name="a",type=String.class),
       &#64;XmlElement(name="b",type=Integer.class),
     })
     List<Object> abc;
     
    

    In this case this method returns a list of two TypeRefs.

    Returns:
    Always non-null. Contains at least one entry. If isValueList()==true, there's always exactly one type.