Operation (Java SE 11 & JDK 11 ) (original) (raw)
- All Known Implementing Classes:
[NamedOperation](NamedOperation.html "class in jdk.dynalink")
,[NamespaceOperation](NamespaceOperation.html "class in jdk.dynalink")
,[StandardOperation](StandardOperation.html "enum in jdk.dynalink")
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
All Methods Instance Methods Default Methods
Modifier and Type Method Description default NamedOperation named(Object name) Returns a NamedOperation using this operation as its base. default NamespaceOperation withNamespace(Namespace namespace) Returns a NamespaceOperation using this operation as its base. default NamespaceOperation withNamespaces(Namespace... namespaces) Returns a NamespaceOperation using this operation as its base. Method Detail
* #### withNamespace default [NamespaceOperation](NamespaceOperation.html "class in jdk.dynalink") withNamespace([Namespace](Namespace.html "interface in jdk.dynalink") namespace) Parameters: `namespace` \- the namespace that is the target of the namespace operation. Returns: a [NamespaceOperation](NamespaceOperation.html "class in jdk.dynalink") with this operation as its base and the specified namespace as its target. Throws: `[IllegalArgumentException](../../../java.base/java/lang/IllegalArgumentException.html "class in java.lang")` \- if this operation is already a namespace operation or a named operation. `[NullPointerException](../../../java.base/java/lang/NullPointerException.html "class in java.lang")` \- if `namespace` is null. * #### withNamespaces default [NamespaceOperation](NamespaceOperation.html "class in jdk.dynalink") withNamespaces([Namespace](Namespace.html "interface in jdk.dynalink")... namespaces) Parameters: `namespaces` \- the namespaces that are the target of the namespace operation. Returns: a [NamespaceOperation](NamespaceOperation.html "class in jdk.dynalink") with this operation as its base and the specified namespaces as its targets. Throws: `[IllegalArgumentException](../../../java.base/java/lang/IllegalArgumentException.html "class in java.lang")` \- if this operation is already a namespace operation or a named operation. `[NullPointerException](../../../java.base/java/lang/NullPointerException.html "class in java.lang")` \- if `namespace` or any of its elements is null. * #### named default [NamedOperation](NamedOperation.html "class in jdk.dynalink") named([Object](../../../java.base/java/lang/Object.html "class in java.lang") name) Returns a [NamedOperation](NamedOperation.html "class in jdk.dynalink") using this operation as its base. Parameters: `name` \- the name that is the target of the named operation. Returns: a [NamedOperation](NamedOperation.html "class in jdk.dynalink") with this operation as its base and the specified name. Throws: `[IllegalArgumentException](../../../java.base/java/lang/IllegalArgumentException.html "class in java.lang")` \- if this operation is already a named operation. `[NullPointerException](../../../java.base/java/lang/NullPointerException.html "class in java.lang")` \- if `name` is null.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.