// Aquire an IDispatch, that has a new NewEnum Property (DISPID_NEWENUM)
for(VARIANT v: IComEnumVariantIterator.wrap(dispatch)) {
// Work with the acquired Variant
// ...
// Finally free it
OleAuto.INSTANCE.VariantClear(v);
}
The IComEnumVariantIterator iterator closes the enumeration it
wraps after the enumeration is exhausted or when the iterator is GCed,
whatever happens earlier.
| Modifier and Type | Field and Description |
|---|---|
| private EnumVariant | |
| private Variant. |
| Access | Constructor and Description |
|---|---|
| public | IComEnumVariantIterator(EnumVariant backingIteration)
IComEnumVariantIterator wraps the supplied EnumVariant and exposes that
as an |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. |
| protected void | finalize()
Overrides java. |
| public boolean | |
| public Iterator | |
| public Variant. | |
| public void | remove()
Overrides default java. |
| private void | |
| public static IComEnumVariantIterator | Returns: IComEnumVariantIterator wrapping the enumeration queried from the supplied objectIDispatch to be analysed dispatch)Helper to get new enumeration from an |
| backingIteration | back to summary |
|---|---|
| private EnumVariant backingIteration | |
| nextValue | back to summary |
|---|---|
| private Variant. | |
| IComEnumVariantIterator | back to summary |
|---|---|
| public IComEnumVariantIterator(EnumVariant backingIteration) IComEnumVariantIterator wraps the supplied EnumVariant and exposes that
as an | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type | |
| next | back to summary |
|---|---|
| public Variant. Implements java. Doc from java. Returns the next element in the iteration. | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |
| retrieveNext | back to summary |
|---|---|
| private void retrieveNext() | |
| wrap | back to summary |
|---|---|
| public static IComEnumVariantIterator wrap(IDispatch dispatch) Helper to get new enumeration from an This expects, that the supplied IDispatch has a property identified by
a
| |