Package io.micronaut.http.hateoas
Class GenericResource
java.lang.Object
io.micronaut.http.hateoas.AbstractResource<GenericResource>
io.micronaut.http.hateoas.GenericResource
- All Implemented Interfaces:
Resource
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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String key, Object v) Add a property to this resource (internal, for deserialization use only).boolean
Get the properties of this resource, as an untyped map.int
hashCode()
toString()
Methods inherited from class io.micronaut.http.hateoas.AbstractResource
embedded, embedded, embedded, getEmbedded, getLinks, link, link, setEmbedded, setLinks
-
Constructor Details
-
GenericResource
Create a new resource. Note: Should only be called by deserialization – if you wish to create your ownResource
, please create a custom implementation ofAbstractResource
.
-
-
Method Details
-
addProperty
Add a property to this resource (internal, for deserialization use only).- Parameters:
key
- Property keyv
- Property value
-
getAdditionalProperties
Get the properties of this resource, as an untyped map.- Returns:
- The properties of this resource
-
equals
-
hashCode
public int hashCode() -
toString
-