Interface ObjectMapper<V>

    • Method Detail

      • factory

        static ObjectMapper.Factory factory()
        Get the default object mapper factory instance.

        This factory has the following characteristics:

        Returns:
        default factory
        Since:
        4.0.0
      • emptyFactoryBuilder

        static ObjectMapper.Factory.Builder emptyFactoryBuilder()
        Create an empty builder.

        This applies none of the standard formats, processors, constraints or resolvers. Unless you want to do something particularly specialized, you should probably be using factoryBuilder().

        Returns:
        new empty builder
        Since:
        4.0.0
      • load

        V load​(ConfigurationNode source)
        throws SerializationException
        Create a new object instance.
        Parameters:
        source - object source
        Returns:
        new instance
        Throws:
        SerializationException - if any invalid data is present. Loading is done in stages, so any deserialization errors will occur before anything is written to objects.
        Since:
        4.0.0
      • fields

        java.util.List<? extends FieldData<?,​V>> fields()
        Get the parameters that will be handled by this mapper.
        Returns:
        immutable list of fields
        Since:
        4.0.0
      • mappedType

        java.lang.reflect.Type mappedType()
        The generic type of object that this mapper instance handles.
        Returns:
        object type
        Since:
        4.0.0
      • canCreateInstances

        boolean canCreateInstances()
        Get whether or not this mapper is capable of creating new instances of its mapped type.

        If this returns false, load(ConfigurationNode) will always fail.

        Returns:
        if the mapped type can be instantiated.
        Since:
        4.0.0