public class NoopComHandle extends comhandle
NoopCom
.BaseDataType.Type
EMPTY, value, ZERO_RESOURCE
Constructor and Description |
---|
NoopComHandle() |
Modifier and Type | Method and Description |
---|---|
BaseDataType |
call(java.lang.String methodName,
java.lang.Object... params)
Calls a COM-method without parameters on the COM-object stored in this com-handle.
|
comhandle |
chain(java.lang.String property)
Chains access to COM property/methods.
|
comhandle |
chainCall(java.lang.String methodName,
java.lang.Object... params)
Calls a COM-method without parameters on the COM-object stored in this com-handle.
|
BaseDataType |
duplicate()
Does the same as standard
clone() method but returns an instance of
BaseDataType and doesn't throw the CloneNotSupportedException . |
BaseDataType |
getProperty(java.lang.String prop)
Obtain a property value from the COM object stored in this handle.
|
BaseDataType |
instantiateUnknown()
Creates a new instance of the same type that represents the
unknown value. |
void |
setIndexedProperty(java.lang.String prop,
java.lang.Object newVal,
java.lang.Object... indices)
Sets a COM property for the COM object stored by the handle, with arbitrary indices.
|
void |
setProperty(java.lang.String prop,
java.lang.Object newVal)
Sets a COM property for the COM object stored by the handle.
|
void |
setUnknown()
Sets the state of this instance's
unknown value flag to true . |
_isValid, assign, assign, assign, assign, compareTo, defaultFormatString, fromResourceId, fromString, getIndexedProperty, getName, getResource, getType, hashCode, isUnknown, isValid, readExternal, removeResource, resourceId, setName, showAccessError, toString, toString, toStringExport, toStringMessage, unwrapComObject, writeExternal
assign, calcFormatLength, createProxy, createProxy, deepCopy, elementsOfType, equals, fallback, formatLength, fromTypeName, generateDefault, generateUnknown, getSize, getTypeName, incompatibleTypesOnConversion, initialize, initializeDefaultExtent, instantiateDefault, instantiateDefaultExtent, invalidInitializer, isAllKnown, isAllKnown, isIncompatibleTypesOnConversion, isProxy, isUnknownValue, maximum, minimum, notUnknownValue, sameType, val, variable
changed, checkUndoable, checkUndoable, checkUndoable, isGlobal, isUndoable, markUndoable, popBlock, rollback, setGlobal
public BaseDataType instantiateUnknown()
unknown
value.instantiateUnknown
in class comhandle
unknown
value.public BaseDataType duplicate()
clone()
method but returns an instance of
BaseDataType
and doesn't throw the CloneNotSupportedException
.public void setUnknown()
unknown value
flag to true
.
Warning: a separate call is needed to ensure that the data of this instance is set to the correct value.
setUnknown
in class comhandle
public void setProperty(java.lang.String prop, java.lang.Object newVal)
setProperty
in class comhandle
prop
- The legacy property name. Case insensitive. If no property is found then a warning
is displayed and method returns without altering the stored object.newVal
- The new value for the property. It must be of a compatible type with the property.public void setIndexedProperty(java.lang.String prop, java.lang.Object newVal, java.lang.Object... indices)
setIndexedProperty
in class comhandle
prop
- The legacy property name. Case insensitive. If no property is found then a warning
is displayed and method returns without altering the stored object.newVal
- The new value for the property. It must be of a compatible type with the property.indices
- A variable number of indices used to access this property's element.public BaseDataType getProperty(java.lang.String prop)
getProperty
in class comhandle
prop
- The legacy name of the property. Case insensitive. If no property is found then a
warning is displayed and method returns unknown
value.unknown
on exceptions.public comhandle chain(java.lang.String property)
ch:prop1:prop2:prop-or-method
will be
converted to something like: ch.chain("prop1").chain("prop2").get("prop-or-method")
chain
in class comhandle
property
- The property to access. It should normally be a com-object property of the object
stored in this comhandle
.comhandle
to the COM object property of currently referred resource. It
normally should be chained with another access for a property of method.public BaseDataType call(java.lang.String methodName, java.lang.Object... params)
call
in class comhandle
methodName
- The method name. Case insensitive. If the COM-object does not declare such method
an error message is displayed and this method returns unknown
value.params
- The list of actual parameters. Their types must be compatible with the parameters
of called method.
TODO: marshal to BDT (?) When code is generated [param] is already BDT.public comhandle chainCall(java.lang.String methodName, java.lang.Object... params)
chainCall
in class comhandle
methodName
- The method name. Case insensitive. If the COM-object does not declare such method
an error message is displayed and this method returns unknown
value.params
- The list of actual parameters. Their types must be compatible with the parameters
of called method.
TODO: marshal to BDT (?) When code is generated [param] is already BDT.comhandle
, so it can be used in a
chained call or property access.