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 boolean
canEqual(java.lang.Object other)
abstract void
encode(CLValueEncoder clve, boolean encodeType)
Called when the object's values must be encoded for serializingvoid
encodeType(CLValueEncoder clve)
boolean
equals(java.lang.Object o)
java.lang.String
getBytes()
abstract P
getClType()
protected java.lang.String
getJsonBytes()
java.lang.String
getParsed()
T
getValue()
int
hashCode()
void
setBytes(java.lang.String bytes)
abstract void
setClType(P value)
protected void
setJsonBytes(java.lang.String bytes)
void
setParsed(java.lang.String parsed)
void
setValue(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.IOException
CLValueEncodeException
NoSuchTypeException
-
setJsonBytes
@ExcludeFromJacocoGeneratedReport protected void setJsonBytes(java.lang.String bytes) throws java.io.IOException, CLValueDecodeException, DynamicInstanceException, NoSuchTypeException
- Throws:
java.io.IOException
CLValueDecodeException
DynamicInstanceException
NoSuchTypeException
-
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:EncodableValue
Called when the object's values must be encoded for serializing- Specified by:
encode
in 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:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-