Class AbstractCLValue<T,P extends AbstractCLType>
- java.lang.Object
-
- com.syntifi.casper.sdk.model.clvalue.AbstractCLValue<T,P>
-
- All Implemented Interfaces:
DecodableValue,EncodableValue
- Direct Known Subclasses:
AbstractCLValueWithChildren,CLValueAny,CLValueBool,CLValueByteArray,CLValueFixedList,CLValueI32,CLValueI64,CLValueKey,CLValueList,CLValueOption,CLValuePublicKey,CLValueResult,CLValueString,CLValueU128,CLValueU256,CLValueU32,CLValueU512,CLValueU64,CLValueU8,CLValueUnit,CLValueURef
public abstract class AbstractCLValue<T,P extends AbstractCLType> extends java.lang.Object implements EncodableValue, DecodableValue
Base class for CLValues- Since:
- 0.0.1
- See Also:
CLTypeData
-
-
Constructor Summary
Constructors Constructor Description AbstractCLValue()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)abstract voidencode(CLValueEncoder clve, boolean encodeType)Called when the object's values must be encoded for serializingvoidencodeType(CLValueEncoder clve)booleanequals(java.lang.Object o)java.lang.StringgetBytes()abstract PgetClType()protected java.lang.StringgetJsonBytes()java.lang.StringgetParsed()TgetValue()inthashCode()voidsetBytes(java.lang.String bytes)abstract voidsetClType(P value)protected voidsetJsonBytes(java.lang.String bytes)voidsetParsed(java.lang.String parsed)voidsetValue(T value)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.syntifi.casper.sdk.model.clvalue.encdec.interfaces.DecodableValue
decode
-
-
-
-
Method Detail
-
getJsonBytes
@ExcludeFromJacocoGeneratedReport protected java.lang.String getJsonBytes() throws java.io.IOException, CLValueEncodeException, NoSuchTypeException
- Throws:
java.io.IOExceptionCLValueEncodeExceptionNoSuchTypeException
-
setJsonBytes
@ExcludeFromJacocoGeneratedReport protected void setJsonBytes(java.lang.String bytes) throws java.io.IOException, CLValueDecodeException, DynamicInstanceException, NoSuchTypeException
- Throws:
java.io.IOExceptionCLValueDecodeExceptionDynamicInstanceExceptionNoSuchTypeException
-
getClType
public abstract P getClType()
-
setClType
public abstract void setClType(P value)
-
encode
public abstract void encode(CLValueEncoder clve, boolean encodeType) throws java.io.IOException, NoSuchTypeException, CLValueEncodeException
Description copied from interface:EncodableValueCalled when the object's values must be encoded for serializing- Specified by:
encodein interfaceEncodableValue- Parameters:
clve- the encoder to be usedencodeType- append encoded type?- Throws:
java.io.IOException- thrown if an IO error occursNoSuchTypeException- thrown if type not foundCLValueEncodeException- thrown if failed to encode a cl value
-
encodeType
public void encodeType(CLValueEncoder clve) throws NoSuchTypeException
- Throws:
NoSuchTypeException
-
getBytes
public java.lang.String getBytes()
-
getParsed
public java.lang.String getParsed()
-
getValue
public T getValue()
-
setBytes
public void setBytes(java.lang.String bytes)
-
setParsed
public void setParsed(java.lang.String parsed)
-
setValue
public void setValue(T value)
-
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
-
-