Class AbstractCLTypeWithChildren
- java.lang.Object
-
- com.casper.sdk.model.clvalue.cltype.AbstractCLType
-
- com.casper.sdk.model.clvalue.cltype.AbstractCLTypeWithChildren
-
- Direct Known Subclasses:
CLTypeList,CLTypeMap,CLTypeOption,CLTypeTuple1,CLTypeTuple2,CLTypeTuple3
public abstract class AbstractCLTypeWithChildren extends AbstractCLType
Base class for all types which have an array of child types- Since:
- 0.0.1
-
-
Constructor Summary
Constructors Constructor Description AbstractCLTypeWithChildren()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)protected AbstractCLTypedeserializeChildType(dev.oak3.sbs4j.DeserializerBuffer deser)abstract voiddeserializeChildTypes(dev.oak3.sbs4j.DeserializerBuffer deser)Updates the child types from the deserializer buffer.booleanequals(java.lang.Object o)CLTypeDatagetChildClTypeData(int index)protected java.util.List<java.lang.Object>getChildTypeObjects()java.util.List<AbstractCLType>getChildTypes()inthashCode()booleanisDeserializable()Indicates if the CLType does not contain an 'Any', or other un-deserializable child type from bytes.protected voidloadCLTypes(java.util.List<java.lang.Object> childTypeObjects)voidserialize(dev.oak3.sbs4j.SerializerBuffer ser)Serializes the type to the provided bufferprotected abstract voidserializeChildTypes(dev.oak3.sbs4j.SerializerBuffer ser)Writes the child types to the serialization buffer.protected voidsetChildTypeObjects(java.util.List<java.lang.Object> childTypeObjects)voidsetChildTypes(java.util.List<AbstractCLType> childTypes)-
Methods inherited from class com.casper.sdk.model.clvalue.cltype.AbstractCLType
getClTypeData, getTypeName
-
-
-
-
Method Detail
-
setChildTypeObjects
protected void setChildTypeObjects(java.util.List<java.lang.Object> childTypeObjects) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException, NoSuchTypeException- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.SecurityExceptionNoSuchTypeException
-
getChildTypeObjects
protected java.util.List<java.lang.Object> getChildTypeObjects()
-
getChildClTypeData
public CLTypeData getChildClTypeData(int index) throws NoSuchTypeException
- Throws:
NoSuchTypeException
-
isDeserializable
public boolean isDeserializable()
Description copied from class:AbstractCLTypeIndicates if the CLType does not contain an 'Any', or other un-deserializable child type from bytes. The reason for this is the 'Any' type does not provide a length for its bytes. This type information is obtained from the JSON metadata.- Specified by:
isDeserializablein classAbstractCLType- Returns:
- true if can be serialized, i.e: a child, or child's child does not contain a deserializable value such as an 'Any' type.
-
loadCLTypes
protected void loadCLTypes(java.util.List<java.lang.Object> childTypeObjects) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException, NoSuchTypeException- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.SecurityExceptionNoSuchTypeException
-
serialize
public void serialize(dev.oak3.sbs4j.SerializerBuffer ser) throws NoSuchTypeExceptionDescription copied from class:AbstractCLTypeSerializes the type to the provided buffer- Overrides:
serializein classAbstractCLType- Parameters:
ser- the buffer to serialize to- Throws:
NoSuchTypeException- if the type is not supported
-
deserializeChildTypes
public abstract void deserializeChildTypes(dev.oak3.sbs4j.DeserializerBuffer deser) throws dev.oak3.sbs4j.exception.ValueDeserializationException, NoSuchTypeException, DynamicInstanceExceptionUpdates the child types from the deserializer buffer.- Parameters:
deser- the deserializer buffer- Throws:
dev.oak3.sbs4j.exception.ValueDeserializationExceptionNoSuchTypeExceptionDynamicInstanceException
-
serializeChildTypes
protected abstract void serializeChildTypes(dev.oak3.sbs4j.SerializerBuffer ser) throws NoSuchTypeExceptionWrites the child types to the serialization buffer.- Parameters:
ser- the serialization buffer- Throws:
NoSuchTypeException
-
deserializeChildType
protected AbstractCLType deserializeChildType(dev.oak3.sbs4j.DeserializerBuffer deser) throws dev.oak3.sbs4j.exception.ValueDeserializationException, NoSuchTypeException, DynamicInstanceException
- Throws:
dev.oak3.sbs4j.exception.ValueDeserializationExceptionNoSuchTypeExceptionDynamicInstanceException
-
setChildTypes
public void setChildTypes(java.util.List<AbstractCLType> childTypes)
-
getChildTypes
public java.util.List<AbstractCLType> getChildTypes()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-