Class ReferencingTypes

java.lang.Object
org.apache.sis.internal.jaxb.TypeRegistration
org.apache.sis.internal.referencing.ReferencingTypes
All Implemented Interfaces:
Function<Object,Object>, UnaryOperator<Object>

public final class ReferencingTypes extends TypeRegistration implements UnaryOperator<Object>
Declares the classes of objects to be marshalled using a default MarshallerPool. This class is declared in the META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration file.
Since:
0.4
Version:
1.0
  • Constructor Details

    • ReferencingTypes

      public ReferencingTypes()
  • Method Details

    • getTypes

      protected void getTypes(Collection<Class<?>> addTo)
      Adds to the given collection the referencing types that should be given to the initial JAXB context.
      Specified by:
      getTypes in class TypeRegistration
      Parameters:
      addTo - the collection in which to add new types.
    • beforeMarshal

      protected UnaryOperator<Object> beforeMarshal()
      Returns the converter to apply before marshalling objects.
      Overrides:
      beforeMarshal in class TypeRegistration
      Returns:
      this.
    • apply

      public Object apply(Object value)
      Ensures that the given value is an instance of a class that can be marshalled, or returns null if the type is not handled by this method.
      Specified by:
      apply in interface Function<Object,Object>
      Parameters:
      value - the value to marshal.
      Returns:
      the given value as a type that can be marshalled, or null.