@Immutable public abstract class PMessageDescriptor<T extends PMessage<T>> extends PDeclaredDescriptor<T>
| Constructor and Description |
|---|
PMessageDescriptor(String programName,
String name,
Supplier<PMessageBuilder<T>> builderSupplier,
boolean simple) |
| Modifier and Type | Method and Description |
|---|---|
PMessageBuilder<T> |
builder() |
boolean |
equals(Object o) |
PField<T> |
fieldForId(int id) |
PField<T> |
fieldForName(String name) |
PField<T> |
fieldForPojoName(String pojoName) |
abstract PField<T> |
findFieldById(int id) |
abstract PField<T> |
findFieldByName(String name) |
abstract PField<T> |
findFieldByPojoName(String pojoName) |
protected Supplier<PMessageBuilder<T>> |
getBuilderSupplier()
Get the actual builder builderSupplier instance.
|
abstract PField<T>[] |
getFields() |
PInterfaceDescriptor<?> |
getImplementing()
Get interface descriptor this message implements.
|
PType |
getType() |
abstract PMessageVariant |
getVariant() |
int |
hashCode() |
boolean |
isSimple() |
getDefaultValue, getName, getProgramName, getQualifiedName, getTypeName, isAutoType, isInnerType, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetQualifiedNamepublic PMessageDescriptor(String programName, String name, Supplier<PMessageBuilder<T>> builderSupplier, boolean simple)
@Nonnull public abstract PField<T>[] getFields()
@Nullable public abstract PField<T> findFieldByName(String name)
name - Name of field to get.public abstract PField<T> findFieldByPojoName(String pojoName)
pojoName - POJO name of field.@Nullable public abstract PField<T> findFieldById(int id)
id - The ID of the field to get.@Nonnull public PField<T> fieldForName(String name)
name - The name of the field to get.IllegalArgumentException - If not present.@Nonnull public PField<T> fieldForPojoName(String pojoName)
pojoName - The POJO name of the field to get.IllegalArgumentException - If not present.@Nullable public PInterfaceDescriptor<?> getImplementing()
@Nonnull public PField<T> fieldForId(int id)
id - The ID of the field to get.IllegalArgumentException - If not present.@Nonnull public abstract PMessageVariant getVariant()
public boolean isSimple()
@Nonnull public PMessageBuilder<T> builder()
protected Supplier<PMessageBuilder<T>> getBuilderSupplier()
Copyright © 2015–2020 morimekta.net. All rights reserved.