Package com.fasterxml.jackson.databind
Class PropertyName
- java.lang.Object
 - 
- com.fasterxml.jackson.databind.PropertyName
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable
public class PropertyName extends java.lang.Object implements java.io.SerializableSimple value class used for containing names of properties as defined by annotations (and possibly other configuration sources).- Since:
 - 2.1
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static PropertyNameNO_NAMESpecial placeholder value that indicates that there is no name associated.static PropertyNameUSE_DEFAULTSpecial placeholder value that indicates that name to use should be based on the standard heuristics. 
- 
Constructor Summary
Constructors Constructor Description PropertyName(java.lang.String simpleName)PropertyName(java.lang.String simpleName, java.lang.String namespace) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertyNameconstruct(java.lang.String simpleName)static PropertyNameconstruct(java.lang.String simpleName, java.lang.String ns)booleanequals(java.lang.Object o)java.lang.StringgetNamespace()java.lang.StringgetSimpleName()inthashCode()booleanhasNamespace()booleanhasSimpleName()booleanhasSimpleName(java.lang.String str)PropertyNameinternSimpleName()booleanisEmpty()Method that is basically equivalent of:SerializableStringsimpleAsEncoded(MapperConfig<?> config)Accessor that may be used to get lazily-constructed efficient representation of the simple name.java.lang.StringtoString()PropertyNamewithNamespace(java.lang.String ns)Fluent factory method for constructing an instance with different namespace.PropertyNamewithSimpleName(java.lang.String simpleName)Fluent factory method for constructing an instance with different simple name. 
 - 
 
- 
- 
Field Detail
- 
USE_DEFAULT
public static final PropertyName 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
public static final PropertyName 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. 
 - 
 
- 
Method Detail
- 
construct
public static PropertyName construct(java.lang.String simpleName)
- Since:
 - 2.6
 
 
- 
construct
public static PropertyName construct(java.lang.String simpleName, java.lang.String ns)
 
- 
internSimpleName
public PropertyName internSimpleName()
 
- 
withSimpleName
public PropertyName withSimpleName(java.lang.String simpleName)
Fluent factory method for constructing an instance with different simple name. 
- 
withNamespace
public PropertyName withNamespace(java.lang.String ns)
Fluent factory method for constructing an instance with different namespace. 
- 
getSimpleName
public java.lang.String getSimpleName()
 
- 
simpleAsEncoded
public SerializableString simpleAsEncoded(MapperConfig<?> config)
Accessor that may be used to get lazily-constructed efficient representation of the simple name.- Since:
 - 2.4
 
 
- 
getNamespace
public java.lang.String getNamespace()
 
- 
hasSimpleName
public boolean hasSimpleName()
 
- 
hasSimpleName
public boolean hasSimpleName(java.lang.String str)
- Since:
 - 2.3
 
 
- 
hasNamespace
public boolean hasNamespace()
 
- 
isEmpty
public boolean isEmpty()
Method that is basically equivalent of:!hasSimpleName() << !hasNamespace();
- Since:
 - 2.4
 
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -