com.prosysopc.ua.typedictionary
Class FieldSpecification

java.lang.Object
  extended by com.prosysopc.ua.typedictionary.FieldSpecification

public class FieldSpecification
extends Object


Constructor Summary
FieldSpecification(String name, Class<?> javaClass, boolean isOptional, DynamicStructureSerializer serializer, boolean isArray, EnumerationSpecification enumerationSpecification, UaNodeId dataTypeId)
          Create new FieldSpecification.
 
Method Summary
 boolean equals(Object obj)
           
 UaNodeId getDataTypeId()
          Returns the DataType node's NodeId of the UA type of this field.
 EnumerationSpecification getEnumerationSpecification()
          If this field's datatype is a custom Enumeration, then this method returns the specification for it.
 Class<?> getJavaClass()
          Returns the java Class of the field.
 String getName()
          Returns the name of the field.
 DynamicStructureSerializer getSerializer()
          Custom serializer for this field, null if none.
 int hashCode()
           
 boolean isArray()
          Returns true if this field is an array.
 boolean isOptional()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldSpecification

public FieldSpecification(String name,
                          Class<?> javaClass,
                          boolean isOptional,
                          DynamicStructureSerializer serializer,
                          boolean isArray,
                          EnumerationSpecification enumerationSpecification,
                          UaNodeId dataTypeId)
Create new FieldSpecification.

Parameters:
name - name of the field, should start with capital letter
javaClass - java class of the field
isOptional - true if the field is Optional, false if not
serializer - custom serializer, can be null
isArray - is the field array (true) or scalar (false)
enumerationSpecification - if this field's datatype is a custom enumeration, a specification for it, otherwise null
dataTypeId - the DataType node's NodeId of this field, null if not known
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getDataTypeId

public UaNodeId getDataTypeId()
Returns the DataType node's NodeId of the UA type of this field. For types read from a TypeDictionary this is a best-effort guess and might be null.

Returns:
DataTypeId of the field, can be null if unknown.

getEnumerationSpecification

public EnumerationSpecification getEnumerationSpecification()
If this field's datatype is a custom Enumeration, then this method returns the specification for it. Otherwise returns null.


getJavaClass

public Class<?> getJavaClass()
Returns the java Class of the field.


getName

public String getName()
Returns the name of the field.


getSerializer

public DynamicStructureSerializer getSerializer()
Custom serializer for this field, null if none.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

isArray

public boolean isArray()
Returns true if this field is an array. Returns false if it is a scalar.


isOptional

public boolean isOptional()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.