Module tools.jackson.databind
Package tools.jackson.databind.ser.impl
Class PropertyBasedObjectIdGenerator
java.lang.Object
com.fasterxml.jackson.annotation.ObjectIdGenerator<T>
com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator
tools.jackson.databind.ser.impl.PropertyBasedObjectIdGenerator
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.annotation.ObjectIdGenerator
ObjectIdGenerator.IdKey -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPropertyBasedObjectIdGenerator(Class<?> scope, BeanPropertyWriter prop) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUseFor(ObjectIdGenerator<?> gen) We must override this method, to prevent errors when scopes are the same, but underlying class (on which to access property) is different.generateId(Object forPojo) final Class<?>getScope()newForSerialization(Object context) Methods inherited from class com.fasterxml.jackson.annotation.ObjectIdGenerator
isValidReferencePropertyName, maySerializeAsObject
-
Field Details
-
_property
-
_scope
-
-
Constructor Details
-
PropertyBasedObjectIdGenerator
-
PropertyBasedObjectIdGenerator
-
-
Method Details
-
canUseFor
We must override this method, to prevent errors when scopes are the same, but underlying class (on which to access property) is different. -
generateId
-
forScope
- Specified by:
forScopein classObjectIdGenerator<Object>
-
newForSerialization
- Specified by:
newForSerializationin classObjectIdGenerator<Object>
-
key
- Specified by:
keyin classObjectIdGenerator<Object>
-
getScope
- Specified by:
getScopein classObjectIdGenerator<T extends Object>
-