| /******************************************************************************* |
| * Copyright (c) 2020 RBEI and others. |
| * |
| * This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v. 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Adhith Gopal - Initial API and Implementation |
| *******************************************************************************/ |
| package org.eclipse.blockchain.core.model; |
| |
| /** |
| * Input Output Application Binary interface(ABI) |
| */ |
| public class IOABI { |
| |
| private String name; |
| private String type; |
| private Class<?> javaType; |
| private Class<?> castType; |
| private boolean isArray = false; |
| private String javaTypeString; |
| /** |
| * If array then this denotes the number of dimensions Eg: bool[][] - In |
| * this case this value will be 2 |
| */ |
| private int dimensionDepth; |
| |
| /** |
| * @return the javaTypeString |
| */ |
| public String getJavaTypeString() { |
| return this.javaTypeString; |
| } |
| |
| /** |
| * @param javaTypeString |
| * the javaTypeString to set |
| */ |
| public void setJavaTypeString(final String javaTypeString) { |
| this.javaTypeString = javaTypeString; |
| } |
| |
| /** |
| * @return the dimensionDepth |
| */ |
| public int getDimensionDepth() { |
| return this.dimensionDepth; |
| } |
| |
| /** |
| * @param dimensionDepth |
| * the dimensionDepth to set |
| */ |
| public void setDimensionDepth(final int dimensionDepth) { |
| this.dimensionDepth = dimensionDepth; |
| } |
| |
| /** |
| * This indexed property is part of event/emit - This has to be investigated |
| */ |
| private boolean indexed = false; |
| /** |
| * Not using this for now have to investigate the purpose of this |
| */ |
| private String internalType; |
| |
| /** |
| * @return the internalType |
| */ |
| public String getInternalType() { |
| return this.internalType; |
| } |
| |
| /** |
| * @param internalType |
| * the internalType to set |
| */ |
| public void setInternalType(final String internalType) { |
| this.internalType = internalType; |
| } |
| |
| /** |
| * @return |
| */ |
| public boolean getIndexed() { |
| return this.indexed; |
| } |
| |
| /** |
| * @param indexed |
| */ |
| public void setIndexed(final boolean indexed) { |
| this.indexed = indexed; |
| } |
| |
| /** |
| * @param isArray |
| * - true if I/O is array else false |
| */ |
| public void setIsArray(final boolean isArray) { |
| this.isArray = isArray; |
| } |
| |
| /** |
| * @return - true if I/O is array else false |
| */ |
| public boolean getIsArray() { |
| return this.isArray; |
| } |
| |
| /** |
| * @return the name |
| */ |
| public String getName() { |
| return this.name; |
| } |
| |
| /** |
| * @return the javaType |
| */ |
| public Class<?> getJavaType() { |
| return this.javaType; |
| } |
| |
| /** |
| * @param javaType |
| * the javaType to set |
| */ |
| public void setJavaType(final Class<?> javaType) { |
| this.javaType = javaType; |
| } |
| |
| /** |
| * @param name |
| * the name to set |
| */ |
| public void setName(final String name) { |
| this.name = name; |
| } |
| |
| /** |
| * @return the type |
| */ |
| public String getType() { |
| return this.type; |
| } |
| |
| /** |
| * @param type |
| * the type to set |
| */ |
| public void setType(final String type) { |
| this.type = type; |
| } |
| |
| /** |
| * @return - The value cast type if I/O is array |
| */ |
| public Class<?> getCastType() { |
| return this.castType; |
| } |
| |
| /** |
| * @param castType |
| * - The value cast type if I/O is array |
| */ |
| public void setCastType(final Class<?> castType) { |
| this.castType = castType; |
| } |
| } |