public class FieldSelector
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
FieldSelector |
add(Field field)
Extend the selector by the field.
|
boolean |
equals(java.lang.Object obj) |
com.google.common.collect.ImmutableList<Field> |
getFields()
Returns the fields of this selector.
|
Field |
getLastField()
Returns the last field of the selector.
|
java.lang.String |
getParamName()
Returns the HTTP parameter name of this selector.
|
TypeRef |
getType()
Returns the type of this field selector, i.e.
|
int |
hashCode() |
boolean |
isPrefixOf(FieldSelector sel)
Check whether this selector is a prefix of another selector.
|
static FieldSelector |
of()
Construct an empty field selector.
|
static FieldSelector |
of(Field field)
Construct a field selector for the given field.
|
static FieldSelector |
of(com.google.common.collect.ImmutableList<Field> fields)
Construct a field selector for the given fields.
|
static FieldSelector |
resolve(MessageType message,
java.lang.String fieldPath)
Construct a field selector by resolving a field path (as in 'a.b.c') against a message.
|
java.lang.String |
toString() |
public static FieldSelector of()
public static FieldSelector of(Field field)
public static FieldSelector of(com.google.common.collect.ImmutableList<Field> fields)
public static FieldSelector resolve(MessageType message, java.lang.String fieldPath)
public com.google.common.collect.ImmutableList<Field> getFields()
public Field getLastField()
public TypeRef getType()
public FieldSelector add(Field field)
public boolean isPrefixOf(FieldSelector sel)
public java.lang.String getParamName()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object