public class ParseField
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ParseField.CommonFields |
| Constructor | Description |
|---|---|
ParseField(java.lang.String name,
java.lang.String... deprecatedNames) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String[] |
getAllNamesIncludedDeprecated() |
|
java.lang.String |
getAllReplacedWith() |
|
java.lang.String[] |
getDeprecatedNames() |
|
java.lang.String |
getPreferredName() |
|
boolean |
match(java.lang.String fieldName,
DeprecationHandler deprecationHandler) |
Does
fieldName match this field? |
java.lang.String |
toString() |
|
ParseField |
withAllDeprecated(java.lang.String allReplacedWith) |
Return a new ParseField where all field names are deprecated and replaced
with
allReplacedWith. |
ParseField |
withDeprecation(java.lang.String... deprecatedNames) |
public ParseField(java.lang.String name,
java.lang.String... deprecatedNames)
name - the primary name for this field. This will be returned by
getPreferredName()deprecatedNames - names for this field which are deprecated and will not be
accepted when strict matching is used.public java.lang.String getPreferredName()
public java.lang.String[] getAllNamesIncludedDeprecated()
public ParseField withDeprecation(java.lang.String... deprecatedNames)
deprecatedNames - deprecated names to include with the returned
ParseFieldParseField using the preferred name from this one
but with the specified deprecated namespublic ParseField withAllDeprecated(java.lang.String allReplacedWith)
allReplacedWith.public boolean match(java.lang.String fieldName,
DeprecationHandler deprecationHandler)
fieldName match this field?fieldName - the field name to match against this ParseFielddeprecationHandler - called if fieldName is deprecatedfieldName matches any of the acceptable
names for this ParseField.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getAllReplacedWith()
ParseField has been entirely
deprecated in favor of something else. This method will return
null if the ParseField has not been completely
deprecated.public java.lang.String[] getDeprecatedNames()
ParseField which are
deprecated.