java.lang.Object
tools.jackson.databind.PropertyName
- All Implemented Interfaces:
Serializable,Named,FullyNamed
Simple value class used for containing names of properties as defined
by annotations (and possibly other configuration sources).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.jackson.core.util.Named
Named.StringAsNamed -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SerializableStringLazily-constructed efficient representation of the simple name.protected final StringAdditional namespace, for formats that have such concept (JSON does not, XML does, for example).protected final StringBasic name of the property.static final PropertyNameSpecial placeholder value that indicates that there is no name associated.static final PropertyNameSpecial placeholder value that indicates that name to use should be based on the standard heuristics. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyName(String simpleName) PropertyName(String simpleName, String namespace) -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyNamestatic PropertyNamebooleangetName()inthashCode()booleanbooleanbooleanhasSimpleName(String str) booleanisEmpty()Method that is basically equivalent of:static PropertyNamemerge(PropertyName name1, PropertyName name2) Method that will combine information from twoPropertyNameinstancesprotected ObjectsimpleAsEncoded(MapperConfig<?> config) Accessor that may be used to get lazily-constructed efficient representation of the simple name.toString()withNamespace(String ns) Fluent factory method for constructing an instance with different namespace.withSimpleName(String simpleName) Fluent factory method for constructing an instance with different simple name.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.jackson.databind.util.FullyNamed
hasName
-
Field Details
-
USE_DEFAULT
Special placeholder value that indicates that name to use should be based on the standard heuristics. This can be different from returning null, as null means "no information available, whereas this value indicates explicit defaulting. -
NO_NAME
Special placeholder value that indicates that there is no name associated. Exact semantics to use (if any) depend on actual annotation in use, but commonly this value disables behavior for which name would be needed. -
_simpleName
Basic name of the property. -
_namespace
Additional namespace, for formats that have such concept (JSON does not, XML does, for example). -
_encodedSimple
Lazily-constructed efficient representation of the simple name.NOTE: not defined as volatile to avoid performance problem with concurrent access in multi-core environments; due to statelessness of
SerializedStringat most leads to multiple instantiations.
-
-
Constructor Details
-
PropertyName
-
PropertyName
-
-
Method Details
-
readResolve
-
construct
-
construct
-
merge
Method that will combine information from twoPropertyNameinstances- Parameters:
name1- Name with higher precedence; may benullname2- Name with lower precedence; may benull- Returns:
- Merged information; only
nullif both arguments arenulls. - Since:
- 2.17
-
internSimpleName
-
withSimpleName
Fluent factory method for constructing an instance with different simple name. -
withNamespace
Fluent factory method for constructing an instance with different namespace. -
getName
-
getFullName
- Specified by:
getFullNamein interfaceFullyNamed
-
getSimpleName
-
simpleAsEncoded
Accessor that may be used to get lazily-constructed efficient representation of the simple name. -
getNamespace
-
hasSimpleName
public boolean hasSimpleName() -
hasSimpleName
- Since:
- 2.3
-
hasNamespace
public boolean hasNamespace() -
isEmpty
public boolean isEmpty()Method that is basically equivalent of:!hasSimpleName() << !hasNamespace();
- Since:
- 2.4
-
equals
-
hashCode
public int hashCode() -
toString
-