Package org.polkadot.types.primitive
Class Method
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,Codec>
-
- org.polkadot.types.codec.Struct
-
- org.polkadot.types.primitive.Method
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,Codec>,Codec,Types.IMethod
- Direct Known Subclasses:
Proposal
public class Method extends Struct implements Types.IMethod
Extrinsic function descriptor, as defined in {@link https://github.com/paritytech/wiki/blob/master/Extrinsic.md#the-extrinsic-format-for-node}.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMethod.DecodedMethodstatic classMethod.DecodeMethodInputstatic classMethod.MethodFunctionstatic classMethod.MethodIndexA wrapper around the `[sectionIndex, methodIndex]` value that uniquely identifies a methodstatic classMethod.Methodsstatic classMethod.ModulesWithMethods
-
Field Summary
Fields Modifier and Type Field Description protected Modules.FunctionMetadatameta
-
Constructor Summary
Constructors Constructor Description Method(java.lang.Object value, Modules.FunctionMetadata meta)
-
Method Summary
Modifier and Type Method Description static java.util.List<Modules.FunctionArgumentMetadata>filterOrigin(Modules.FunctionMetadata meta)java.util.List<Codec>getArgs()The arguments for the function callTypes.ConstructorDefgetArgsDef()byte[]getCallIndex()The encoded `[sectionIndex, methodIndex]` identifierbyte[]getData()The encoded dataModules.FunctionMetadatagetMeta()The FunctionMetadatabooleanhasOrigin()`true` if the `Origin` type is on the method (extrinsic method)static voidinjectMethods(Method.ModulesWithMethods moduleMethods)-
Methods inherited from class org.polkadot.types.codec.Struct
builder, eq, getEncodedLength, getField, isEmpty, toArray, toHex, toJson, toString, toU8a, with
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
meta
protected Modules.FunctionMetadata meta
-
-
Constructor Detail
-
Method
public Method(java.lang.Object value, Modules.FunctionMetadata meta)
-
-
Method Detail
-
filterOrigin
public static java.util.List<Modules.FunctionArgumentMetadata> filterOrigin(Modules.FunctionMetadata meta)
-
injectMethods
public static void injectMethods(Method.ModulesWithMethods moduleMethods)
-
getArgs
public java.util.List<Codec> getArgs()
The arguments for the function call- Specified by:
getArgsin interfaceTypes.IMethod
-
getArgsDef
public Types.ConstructorDef getArgsDef()
- Specified by:
getArgsDefin interfaceTypes.IMethod
-
getCallIndex
public byte[] getCallIndex()
The encoded `[sectionIndex, methodIndex]` identifier- Specified by:
getCallIndexin interfaceTypes.IMethod
-
getData
public byte[] getData()
The encoded data- Specified by:
getDatain interfaceTypes.IMethod
-
hasOrigin
public boolean hasOrigin()
`true` if the `Origin` type is on the method (extrinsic method)- Specified by:
hasOriginin interfaceTypes.IMethod
-
getMeta
public Modules.FunctionMetadata getMeta()
The FunctionMetadata- Specified by:
getMetain interfaceTypes.IMethod
-
-