public final class DynamicStructureImpl extends java.lang.Object implements DynamicStructure, java.io.Serializable
DynamicStructure implementation backed by a StructValue.| Constructor and Description |
|---|
DynamicStructureImpl(StructValue strValue) |
DynamicStructureImpl(StructValue strValue,
com.vmware.vapi.internal.bindings.TypeConverter converter) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Structure> |
_convertTo(java.lang.Class<T> clazz)
Converts this structure into an instance of the provided class structure
if possible.
|
java.lang.String |
_getCanonicalName()
Returns the canonical name of the structure.
|
StructValue |
_getDataValue()
Returns this
Structure represented in the dynamic
DataValue model. |
boolean |
_hasTypeNameOf(java.lang.Class<? extends Structure> clazz)
Checks that the runtime type name matches the type name from the binding
class.
|
boolean |
equals(java.lang.Object other) |
<T> T |
getField(java.lang.String fieldName,
java.lang.Class<T> targetClass)
Gets a field value, represented as static bindings type.
|
int |
hashCode() |
<T> void |
setField(java.lang.String fieldName,
T newValue,
java.lang.Class<T> valueClass)
Sets a field value, represented as static bindings type.
|
java.lang.String |
toString() |
public DynamicStructureImpl(StructValue strValue)
public DynamicStructureImpl(StructValue strValue, com.vmware.vapi.internal.bindings.TypeConverter converter)
public StructValue _getDataValue()
StructureStructure represented in the dynamic
DataValue model.
Attempts to change the returned StructValue
representation are not required to change the state of this structure.
Actually the behavior is implementation dependent and is unspecified.
In general the returned value shouldn't be changed.
_getDataValue in interface StructureStructValue representing this structurepublic <T> T getField(java.lang.String fieldName,
java.lang.Class<T> targetClass)
DynamicStructuregetField in interface DynamicStructureT - static binding type for the field valuefieldName - name of the field to gettargetClass - Class for the result field valuepublic <T> void setField(java.lang.String fieldName,
T newValue,
java.lang.Class<T> valueClass)
DynamicStructuresetField in interface DynamicStructureT - static binding type for the field valuefieldName - name of the field to setnewValue - new value for fieldName fieldvalueClass - Class of newValuepublic boolean _hasTypeNameOf(java.lang.Class<? extends Structure> clazz)
Structure_hasTypeNameOf in interface Structureclazz - type of the result structure. cannot be null.public <T extends Structure> T _convertTo(java.lang.Class<T> clazz)
Structure_convertTo in interface Structureclazz - type of the result structure. cannot be null.CoreException is thrown otherwise.public java.lang.String _getCanonicalName()
Structureorg.example.FooBar would turn into
org.example.foo_bar._getCanonicalName in interface Structurepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object