public class PropertyName extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected SerializableString |
_encodedSimple
Lazily-constructed efficient representation of the simple name.
|
protected String |
_namespace
Additional namespace, for formats that have such concept (JSON
does not, XML does, for example).
|
protected String |
_simpleName
Basic name of the property.
|
static PropertyName |
NO_NAME
Special placeholder value that indicates that there is no name associated.
|
static PropertyName |
USE_DEFAULT
Special placeholder value that indicates that name to use should be
based on the standard heuristics.
|
Constructor and Description |
---|
PropertyName(String simpleName) |
PropertyName(String simpleName,
String namespace) |
Modifier and Type | Method and Description |
---|---|
static PropertyName |
construct(String simpleName) |
static PropertyName |
construct(String simpleName,
String ns) |
boolean |
equals(Object o) |
String |
getNamespace() |
String |
getSimpleName() |
int |
hashCode() |
boolean |
hasNamespace() |
boolean |
hasSimpleName() |
boolean |
hasSimpleName(String str) |
PropertyName |
internSimpleName() |
boolean |
isEmpty()
Method that is basically equivalent of:
|
protected Object |
readResolve() |
SerializableString |
simpleAsEncoded(MapperConfig<?> config)
Accessor that may be used to get lazily-constructed efficient
representation of the simple name.
|
String |
toString() |
PropertyName |
withNamespace(String ns)
Fluent factory method for constructing an instance with different
namespace.
|
PropertyName |
withSimpleName(String simpleName)
Fluent factory method for constructing an instance with different
simple name.
|
public static final PropertyName USE_DEFAULT
public static final PropertyName NO_NAME
protected final String _simpleName
protected final String _namespace
protected SerializableString _encodedSimple
NOTE: not defined as volatile to avoid performance problem with
concurrent access in multi-core environments; due to statelessness
of SerializedString
at most leads to multiple instantiations.
public PropertyName(String simpleName)
protected Object readResolve()
public static PropertyName construct(String simpleName)
public static PropertyName construct(String simpleName, String ns)
public PropertyName internSimpleName()
public PropertyName withSimpleName(String simpleName)
public PropertyName withNamespace(String ns)
public String getSimpleName()
public SerializableString simpleAsEncoded(MapperConfig<?> config)
public String getNamespace()
public boolean hasSimpleName()
public boolean hasSimpleName(String str)
public boolean hasNamespace()
public boolean isEmpty()
!hasSimpleName() << !hasNamespace();
Copyright © 2008–2018 FasterXML. All rights reserved.