public abstract class TpmEnum<T extends TpmEnum<T>> extends Object implements TpmMarshaller
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TpmEnum.ValueMap<T extends TpmEnum<T>>
Map used for conversion from an int value to the corresponding TpmEnum derived type
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
Name |
protected Enum<?> |
NameAsEnum |
protected int |
Value |
| Modifier | Constructor and Description |
|---|---|
protected |
TpmEnum(int value,
Enum<?> nameAsEnum,
TpmEnum.ValueMap<T> values) |
protected |
TpmEnum(int value,
TpmEnum.ValueMap<T> values) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
protected static <T extends TpmEnum<T>> |
fromInt(int value,
TpmEnum.ValueMap<T> values,
Class<T> cls) |
protected static <T extends TpmEnum<T>> |
fromTpm(byte[] buf,
TpmEnum.ValueMap<T> values,
Class<T> cls) |
protected static <T extends TpmEnum<T>> |
fromTpm(InByteBuf buf,
TpmEnum.ValueMap<T> values,
Class<T> cls) |
int |
hashCode() |
void |
initFromTpm(InByteBuf buf)
Populate this object from the TPM representation in the input byte buffer object
|
String |
name() |
int |
toInt() |
String |
toString() |
String |
toStringVerbose() |
byte[] |
toTpm()
Convert this object to its TPM representation and return it as a byte array
|
void |
toTpm(OutByteBuf buf)
Convert this object to its TPM representation and store in the output byte buffer object
|
protected abstract int |
wireSize() |
protected int Value
protected Enum<?> NameAsEnum
protected String Name
protected TpmEnum(int value,
Enum<?> nameAsEnum,
TpmEnum.ValueMap<T> values)
protected TpmEnum(int value,
TpmEnum.ValueMap<T> values)
protected abstract int wireSize()
protected static <T extends TpmEnum<T>> T fromInt(int value, TpmEnum.ValueMap<T> values, Class<T> cls)
protected static <T extends TpmEnum<T>> T fromTpm(byte[] buf, TpmEnum.ValueMap<T> values, Class<T> cls)
protected static <T extends TpmEnum<T>> T fromTpm(InByteBuf buf, TpmEnum.ValueMap<T> values, Class<T> cls)
public int toInt()
public void initFromTpm(InByteBuf buf)
TpmMarshallerinitFromTpm in interface TpmMarshallerbuf - An input byte bufferpublic byte[] toTpm()
TpmMarshallertoTpm in interface TpmMarshallerpublic void toTpm(OutByteBuf buf)
TpmMarshallertoTpm in interface TpmMarshallerbuf - An output byte bufferpublic String name()
public String toStringVerbose()
Copyright © 2017. All rights reserved.