public class Field
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Field
subtypes to acheive compile-time type checking.Modifier and Type | Field and Description |
---|---|
static int |
OPFLG_CUST_FLDS_ONLY |
static int |
PIN_DD_FLDS_CUST_FLDS_MAX_RANGE1 |
static int |
PIN_DD_FLDS_CUST_FLDS_MIN_RANGE1 |
static int |
PIN_DD_FLDS_CUST_FLDS_MIN_RANGE2 |
static int |
TYPE_ARRAY |
static int |
TYPE_BINSTR |
static int |
TYPE_BUF |
static int |
TYPE_DECIMAL |
static int |
TYPE_ENUM |
static int |
TYPE_ERR |
static int |
TYPE_INT |
static int |
TYPE_INT64 |
static int |
TYPE_NUM |
static int |
TYPE_OBJ |
static int |
TYPE_POID |
static int |
TYPE_STR |
static int |
TYPE_SUBSTRUCT |
static int |
TYPE_TEXTBUF |
static int |
TYPE_TIME |
static int |
TYPE_TSTAMP |
static int |
TYPE_UINT |
static int |
TYPE_UNUSED |
Constructor and Description |
---|
Field(int nameID,
int typeID)
Constructs an instance of
Field from a name ID and a type
ID. |
Field(int nameID,
int typeID,
java.lang.String name)
Constructs an instance of
Field from a name ID , typeID and name
. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones a field.
|
boolean |
equals(java.lang.Object other)
Determines if two fields are equal.
|
static Field |
fromName(int nameid)
Constructs and returns an instance of Field based on the name ID with
type of the field.
|
static Field |
fromName(java.lang.String origName)
Constructs and returns an instance of Field based on the name of the
field.
|
static Field |
fromPINName(java.lang.String name)
Constructs and returns an instance of Field based on the name of the
field as defined in the C header files.
|
int |
getName()
Returns the field name.
|
int |
getNameID()
Returns the field name ID.
|
java.lang.String |
getNameString()
Returns the string name of the field as it appears in the C header files
(for example, 'PIN_FLD_POID').
|
static java.lang.String |
getNameString(int nameID)
Returns the string name of the field as it appears in the C header files
(for example, 'PIN_FLD_POID').
|
java.lang.String |
getPINType()
Returns a string representing the PIN type name of this field.
|
int |
getTypeID()
Returns the type name.
|
int |
hashCode()
Returns a hash value for this object.
|
static java.lang.String |
macroToClass(java.lang.String name)
Converts a string field name from the PIN macro form to the Java class
name form.
|
java.lang.String |
toString()
Returns a string representation of field.
|
public static final int TYPE_UNUSED
public static final int TYPE_INT
public static final int TYPE_UINT
public static final int TYPE_ENUM
public static final int TYPE_NUM
public static final int TYPE_STR
public static final int TYPE_BUF
public static final int TYPE_POID
public static final int TYPE_TSTAMP
public static final int TYPE_ARRAY
public static final int TYPE_SUBSTRUCT
public static final int TYPE_OBJ
public static final int TYPE_BINSTR
public static final int TYPE_ERR
public static final int TYPE_DECIMAL
public static final int TYPE_TIME
public static final int TYPE_TEXTBUF
public static final int TYPE_INT64
public static final int OPFLG_CUST_FLDS_ONLY
public static final int PIN_DD_FLDS_CUST_FLDS_MIN_RANGE1
public static final int PIN_DD_FLDS_CUST_FLDS_MAX_RANGE1
public static final int PIN_DD_FLDS_CUST_FLDS_MIN_RANGE2
public Field(int nameID, int typeID, java.lang.String name)
Field
from a name ID , typeID and name
.nameID
- A valid Portal field name.typeID
- A valid Portal storable class type name.name
- Name of the field.public Field(int nameID, int typeID)
Field
from a name ID and a type
ID.nameID
- A valid Portal field name.typeID
- A valid Portal storable class type name.public static Field fromPINName(java.lang.String name)
name
- The Field name string.public static Field fromName(java.lang.String origName)
origName
- The Field name stringpublic static Field fromName(int nameid)
nameid
- The name ID of the field with type, as in the C headerspublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- thown if not supported.public int getTypeID()
public int getNameID()
public int getName()
public java.lang.String getNameString()
public static java.lang.String getNameString(int nameID)
public static java.lang.String macroToClass(java.lang.String name)
name
- Field name in PIN macro form.public java.lang.String getPINType()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- The other field.true
if the name ID of both fields is the same.public java.lang.String toString()
toString
in class java.lang.Object