public interface BeanOperations
The configuration for a JavaBean operation.
Typically, it is parsed from a class by the BeanOperationParser,
and used in the BeanOperationExecutor to indicate
how the executor should operate on the input object based on the configuration.
The obtained operation configuration through getAssembleOperations() or getDisassembleOperations()
is generally in order, and the order follows the definition of Sorted.getSort().
However, the actual execution order needs to be ensured by the BeanOperationExecutor,
hence different executors may lead to different execution orders.
Since the configuration may be nested,
such as when an attribute type that needs to be disassembled in an object is another object,
the object operation configuration comparator may still be in recursive resolution when obtained.
Therefore, it is essential to ensure that
the configuration object has completed resolution through isActive() before use.
AssembleOperation,
DisassembleOperation,
BeanOperationExecutor,
BeanOperationParser| 限定符和类型 | 接口和说明 |
|---|---|
static class |
BeanOperations.EmptyBeanOperations
Empty bean operations.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addAssembleOperations(AssembleOperation operation)
Add assembly operation.
|
void |
addDisassembleOperations(DisassembleOperation operation)
Add disassembly operation.
|
static BeanOperations |
empty()
Get an empty bean operations.
|
Collection<AssembleOperation> |
getAssembleOperations()
Get assembly operations.
|
Collection<DisassembleOperation> |
getDisassembleOperations()
Get disassembly operations.
|
AnnotatedElement |
getSource()
Get the source object corresponding to the current operation.
|
boolean |
isActive()
Whether the current operation configuration is active.
|
default boolean |
isEmpty()
Whether the current operation is empty.
|
void |
setActive(boolean active)
Set the current operation configuration active state.
|
static BeanOperations empty()
AnnotatedElement getSource()
Collection<AssembleOperation> getAssembleOperations()
void addAssembleOperations(AssembleOperation operation)
operation - operationCollection<DisassembleOperation> getDisassembleOperations()
void addDisassembleOperations(DisassembleOperation operation)
operation - operationboolean isActive()
void setActive(boolean active)
active - active statedefault boolean isEmpty()
Copyright © 2023. All rights reserved.