Interface Operation
- All Known Implementing Classes:
-
NamedOperation
,NamespaceOperation
,StandardOperation
public interface Operation
An object that describes a dynamic operation. Dynalink defines a set of standard operations with the
StandardOperation
class, as well as a way to express the target namespace(s)
of an operation on an object using NamespaceOperation
and finally a way to attach a fixed target name to an operation using NamedOperation
. When presenting examples in this documentation, we will refer to standard operations using their name (e.g. GET
), to namespace operations by separating their base operation with a colon from their namespace (e.g. GET:PROPERTY
), or in case of multiple namespaces we will further separate those with the vertical line character (e.g. GET:PROPERTY|ELEMENT
), and finally we will refer to named operations by separating the base operation and the name with the colon character (e.g. GET:PROPERTY|ELEMENT:color
).Method Summary
Modifier and Type | Method | Description |
---|---|---|
default NamedOperation |
named |
Returns a NamedOperation using this operation as its base. |
default NamespaceOperation |
withNamespace |
Returns a NamespaceOperation using this operation as its base. |
default NamespaceOperation |
withNamespaces |
Returns a NamespaceOperation using this operation as its base. |
Method Details
withNamespace
default NamespaceOperation withNamespace(Namespace namespace)
Returns a
NamespaceOperation
using this operation as its base.- Parameters:
-
namespace
- the namespace that is the target of the namespace operation. - Returns:
- a
NamespaceOperation
with this operation as its base and the specified namespace as its target. - Throws:
-
IllegalArgumentException
- if this operation is already a namespace operation or a named operation. -
NullPointerException
- ifnamespace
is null.
withNamespaces
default NamespaceOperation withNamespaces(Namespace... namespaces)
Returns a
NamespaceOperation
using this operation as its base.- Parameters:
-
namespaces
- the namespaces that are the target of the namespace operation. - Returns:
- a
NamespaceOperation
with this operation as its base and the specified namespaces as its targets. - Throws:
-
IllegalArgumentException
- if this operation is already a namespace operation or a named operation. -
NullPointerException
- ifnamespace
or any of its elements is null.
named
default NamedOperation named(Object name)
Returns a
NamedOperation
using this operation as its base.- Parameters:
-
name
- the name that is the target of the named operation. - Returns:
- a
NamedOperation
with this operation as its base and the specified name. - Throws:
-
IllegalArgumentException
- if this operation is already a named operation. -
NullPointerException
- ifname
is null.
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/jdk.dynalink/jdk/dynalink/Operation.html