Class GenericResource

All Implemented Interfaces:
Resource

@Introspected public final class GenericResource extends AbstractResource<GenericResource>
Resource with indeterminate structure. This is used as the deserialization target of Resource.getEmbedded(), because we can't determine the type of the resource for deserialization, there.
Since:
3.4.0
Author:
yawkat
  • Constructor Details

    • GenericResource

      @Internal public GenericResource()
      Create a new resource. Note: Should only be called by deserialization – if you wish to create your own Resource, please create a custom implementation of AbstractResource.
  • Method Details

    • addProperty

      @Internal public void addProperty(String key, Object v)
      Add a property to this resource (internal, for deserialization use only).
      Parameters:
      key - Property key
      v - Property value
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Get the properties of this resource, as an untyped map.
      Returns:
      The properties of this resource
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object