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 Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)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 contains and 'Any', or other un-deserializable child type from bytes.protected voidloadCLTypes(java.util.List<java.lang.Object> childTypeObjects)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 contains and '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
-
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
-
-