public class InspcFieldOfStruct
extends java.lang.Object
var should be gotten respectively created.
A field is created as answer of 'cmdGetFields' from a target. In that time the field is not accessed already,
only its name and type is known. Only this information are stored here.
A field can be created for a known type of struct without access to the target too.
A field is more lightweight than a variable.| Modifier and Type | Field and Description |
|---|---|
boolean |
hasSubstruct |
java.lang.String |
identifier |
(package private) static java.util.Map<java.lang.String,java.lang.String> |
idxPrimitiveTypes |
java.lang.String |
nameShow |
int |
nrofArrayElements |
InspcStruct |
struct |
java.lang.String |
type |
(package private) InspcVariable |
var
Maybe null if the field was not read until now.
|
| Constructor and Description |
|---|
InspcFieldOfStruct(InspcStruct parent,
java.lang.String nameShow,
java.lang.String identifier,
java.lang.String type,
int nrofArrayElements,
boolean hasSubstruct)
Creates a field in a given parent struct.
|
InspcFieldOfStruct(InspcVariable var,
java.lang.String type,
int nrofArrayElements,
boolean hasSubstruct)
Creates a field for a given variable.
|
| Modifier and Type | Method and Description |
|---|---|
InspcVariable |
variable(InspcVariable parent,
VariableContainer_ifc container)
Returns the variable which is assigned to the given field.
|
InspcVariable |
variableExisting()
Returns the existing variable, do not create a new one, returns null if this field has not a variable yet.
|
(package private) boolean |
XXXhasSubstruct() |
public final InspcStruct struct
public final java.lang.String nameShow
public final java.lang.String identifier
public final java.lang.String type
public final boolean hasSubstruct
public final int nrofArrayElements
InspcVariable var
static java.util.Map<java.lang.String,java.lang.String> idxPrimitiveTypes
public InspcFieldOfStruct(InspcStruct parent, java.lang.String nameShow, java.lang.String identifier, java.lang.String type, int nrofArrayElements, boolean hasSubstruct)
parent - The struct which contains this field.nameShow - The name to show in the table.identifier - The name to use for creating a variable.type - The type to show in table.nrofArrayElements - >0 then it is an array type.hasSubstruct - true then it describes a variable which is a struct.
The InspcStruct instance of this field which contains the sub fields will be referenced
if an variable was created with var. InspcVariable.itsStruct.public InspcFieldOfStruct(InspcVariable var, java.lang.String type, int nrofArrayElements, boolean hasSubstruct)
var - type - The type to show in table.nrofArrayElements - >0 then it is an array type.hasSubstruct - true then it describes a variable which is a struct.
The InspcStruct instance of this field which contains the sub fields will be referenced
if an variable was created with var. InspcVariable.itsStruct.boolean XXXhasSubstruct()
public InspcVariable variable(InspcVariable parent, VariableContainer_ifc container)
param - the variable of the structure, same as InspcStruct.varOfStruct.container - the container where all variables can be gotten with given path. It is the InspcMngpublic InspcVariable variableExisting()