Class NamedArg<P extends AbstractCLType>
- java.lang.Object
-
- com.syntifi.casper.sdk.model.deploy.NamedArg<P>
-
- All Implemented Interfaces:
EncodableValue
public class NamedArg<P extends AbstractCLType> extends java.lang.Object implements EncodableValue
Named arguments to a contract- Since:
- 0.0.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNamedArg.NamedArgBuilder<P extends AbstractCLType>
-
Constructor Summary
Constructors Constructor Description NamedArg()NamedArg(java.lang.String type, AbstractCLValue<?,P> clValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <P extends AbstractCLType>
NamedArg.NamedArgBuilder<P>builder()voidencode(CLValueEncoder clve, boolean encodeType)Called when the object's values must be encoded for serializingAbstractCLValue<?,P>getClValue()The second value in the array is a CLValue typejava.lang.StringgetType()The first value in the array is the type of the argvoidsetClValue(AbstractCLValue<?,P> clValue)The second value in the array is a CLValue typevoidsetType(java.lang.String type)The first value in the array is the type of the arg
-
-
-
Constructor Detail
-
NamedArg
public NamedArg()
-
NamedArg
public NamedArg(java.lang.String type, AbstractCLValue<?,P> clValue)
-
-
Method Detail
-
encode
public void encode(CLValueEncoder clve, boolean encodeType) throws java.io.IOException, CLValueEncodeException, DynamicInstanceException, NoSuchTypeException
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 occursCLValueEncodeException- thrown if failed to encode a cl valueDynamicInstanceException- thrown if it could not instantiate a typeNoSuchTypeException- thrown if type not found
-
builder
public static <P extends AbstractCLType> NamedArg.NamedArgBuilder<P> builder()
-
getType
public java.lang.String getType()
The first value in the array is the type of the arg
-
getClValue
public AbstractCLValue<?,P> getClValue()
The second value in the array is a CLValue type
-
setType
public void setType(java.lang.String type)
The first value in the array is the type of the arg
-
setClValue
public void setClValue(AbstractCLValue<?,P> clValue)
The second value in the array is a CLValue type
-
-