public abstract class PMessageDescriptor<T extends PMessage<T,F>,F extends PField> extends PDeclaredDescriptor<T>
| Constructor and Description |
|---|
PMessageDescriptor(String programName,
String name,
Supplier<PMessageBuilder<T,F>> builderSupplier,
boolean simple) |
| Modifier and Type | Method and Description |
|---|---|
PMessageBuilder<T,F> |
builder()
Get the builder for the given declared type.
|
boolean |
equals(Object o) |
F |
fieldForId(int id) |
F |
fieldForName(String name) |
abstract F |
findFieldById(int id) |
abstract F |
findFieldByName(String name) |
protected Supplier<PMessageBuilder<T,F>> |
getBuilderSupplier()
Get the actual builder builderSupplier instance.
|
F |
getField(int key)
Deprecated.
Use
findFieldById(int) instead. |
F |
getField(String name)
Deprecated.
Use
findFieldByName(String) instead. |
abstract F[] |
getFields() |
PType |
getType() |
abstract PMessageVariant |
getVariant() |
int |
hashCode() |
boolean |
isSimple() |
getDefaultValue, getName, getProgramName, getQualifiedName, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetQualifiedName@Nonnull public abstract F[] getFields()
@Nullable public abstract F findFieldByName(String name)
name - Name of field to get.@Nullable public abstract F findFieldById(int id)
id - The ID of the field to get.@Nonnull public F fieldForName(String name)
name - The name of the field to get.IllegalArgumentException - If not present.@Nonnull public F fieldForId(int id)
id - The ID of the field to get.IllegalArgumentException - If not present.@Deprecated public F getField(String name)
findFieldByName(String) instead.name - Field name.@Deprecated public F getField(int key)
findFieldById(int) instead.key - Field key.@Nonnull public abstract PMessageVariant getVariant()
public boolean isSimple()
@Nonnull public PMessageBuilder<T,F> builder()
PDeclaredDescriptorprotected Supplier<PMessageBuilder<T,F>> getBuilderSupplier()
Copyright © 2015–2018 morimekta.net. All rights reserved.