public class FieldSignature extends MemberSignature
name| Constructor and Description |
|---|
FieldSignature(String name)
Creates a field signature, with the given name.
|
FieldSignature(String name,
FieldType type)
Creates a field signature, with the given name and type.
|
| Modifier and Type | Method and Description |
|---|---|
protected StringJoiner |
buildToString() |
boolean |
equals(Object obj) |
Optional<FieldType> |
getType()
Gets the
FieldType of the field, if present. |
int |
hashCode() |
static FieldSignature |
of(Field field)
Creates a
FieldSignature from the given field. |
static FieldSignature |
of(String name,
String type)
Creates a new field signature with the given name and
decoded type descriptor.
|
String |
toJvmsIdentifier()
Returns a JVMS-like identifier corresponding to this signature.
|
getName, toStringpublic FieldSignature(String name, FieldType type)
name - The name of the fieldtype - The type of the fieldpublic FieldSignature(String name)
name - The name of the fieldpublic static FieldSignature of(String name, String type)
name - The name of the fieldtype - The raw type of the fieldpublic static FieldSignature of(Field field)
FieldSignature from the given field.field - The fieldpublic Optional<FieldType> getType()
FieldType of the field, if present.Optionalpublic String toJvmsIdentifier()
MemberSignature
For field signatures, this will take the form
name(descriptor).
For method signatures, this will take the form
name(params)ret_type - in other terms, the name directly
concatenated with the JVMS descriptor.
toJvmsIdentifier in class MemberSignatureprotected StringJoiner buildToString()
buildToString in class MemberSignature