类 SolidityContractWrapper
java.lang.Object
org.fisco.bcos.sdk.codegen.SolidityContractWrapper
public class SolidityContractWrapper
extends java.lang.Object
Generate Java Classes based on generated Solidity bin and abi files.
-
构造器概要
构造器 构造器 说明 SolidityContractWrapper()
-
方法概要
修饰符和类型 方法 说明 protected static java.util.List<com.squareup.javapoet.ParameterSpec>
buildParameterTypes(java.util.List<ABIDefinition.NamedType> namedTypes)
protected static com.squareup.javapoet.TypeName
buildTypeName(java.lang.String typeDeclaration)
protected static java.util.List<com.squareup.javapoet.TypeName>
buildTypeNames(java.util.List<ABIDefinition.NamedType> namedTypes)
protected static java.lang.String
createValidParamName(java.lang.String name, int idx)
Public Solidity arrays and maps require an unnamed input parameter - multiple if they require a struct type.void
generateJavaFiles(java.lang.String contractName, java.lang.String bin, java.lang.String smBin, java.lang.String abi, java.lang.String destinationDir, java.lang.String basePackageName)
protected static com.squareup.javapoet.TypeName
getEventNativeType(com.squareup.javapoet.TypeName typeName)
static java.lang.String
getInputOutputFunctionName(ABIDefinition functionDefinition, boolean isOverLoad)
protected static com.squareup.javapoet.TypeName
getNativeType(com.squareup.javapoet.ParameterizedTypeName parameterizedTypeName)
protected static com.squareup.javapoet.TypeName
getNativeType(com.squareup.javapoet.TypeName typeName)
java.util.List<java.lang.String>
stringToArrayString(java.lang.String binary)
protected void
write(java.lang.String packageName, com.squareup.javapoet.TypeSpec typeSpec, java.lang.String destinationDir)
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
构造器详细资料
-
SolidityContractWrapper
public SolidityContractWrapper()
-
-
方法详细资料
-
generateJavaFiles
public void generateJavaFiles(java.lang.String contractName, java.lang.String bin, java.lang.String smBin, java.lang.String abi, java.lang.String destinationDir, java.lang.String basePackageName) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.UnsupportedOperationException, CodeGenException- 抛出:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.UnsupportedOperationException
CodeGenException
-
write
protected void write(java.lang.String packageName, com.squareup.javapoet.TypeSpec typeSpec, java.lang.String destinationDir) throws java.io.IOException- 抛出:
java.io.IOException
-
stringToArrayString
public java.util.List<java.lang.String> stringToArrayString(java.lang.String binary) -
getNativeType
protected static com.squareup.javapoet.TypeName getNativeType(com.squareup.javapoet.TypeName typeName) -
getNativeType
protected static com.squareup.javapoet.TypeName getNativeType(com.squareup.javapoet.ParameterizedTypeName parameterizedTypeName) -
getEventNativeType
protected static com.squareup.javapoet.TypeName getEventNativeType(com.squareup.javapoet.TypeName typeName) -
buildParameterTypes
protected static java.util.List<com.squareup.javapoet.ParameterSpec> buildParameterTypes(java.util.List<ABIDefinition.NamedType> namedTypes) -
createValidParamName
protected static java.lang.String createValidParamName(java.lang.String name, int idx)Public Solidity arrays and maps require an unnamed input parameter - multiple if they require a struct type.- 参数:
name
- parameter nameidx
- parameter index- 返回:
- non-empty parameter name
-
buildTypeNames
protected static java.util.List<com.squareup.javapoet.TypeName> buildTypeNames(java.util.List<ABIDefinition.NamedType> namedTypes) -
getInputOutputFunctionName
public static java.lang.String getInputOutputFunctionName(ABIDefinition functionDefinition, boolean isOverLoad) -
buildTypeName
protected static com.squareup.javapoet.TypeName buildTypeName(java.lang.String typeDeclaration)
-