public class TemplateModelProxyHandler extends Object implements Serializable
TemplateModel proxy objects.
For internal use only. May be renamed or removed in a future release.
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateModelProxyHandler.InterfaceProxy
Base type used for interface proxy types.
|
protected static interface |
TemplateModelProxyHandler.ModelProxy
Gives access to the state node of a proxy instance.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createModelProxy(StateNode stateNode,
BeanModelType<T> modelType)
Creates a proxy object for the given
modelType type for the given
state node. |
static BeanModelType<?> |
getModelTypeForProxy(Object proxy)
Gets the model type that a proxy instance is bound to.
|
static StateNode |
getStateNodeForProxy(Object proxy)
Gets the state node that a proxy is bound to.
|
Object |
intercept(Object target,
Method method,
Object[] args)
Processes a method invocation on a Byte buddy proxy instance and returns
the result.
|
static boolean |
isProxy(Object proxy)
Checks if the given object is a proxy created by this class.
|
@RuntimeType public Object intercept(@This Object target, @Origin Method method, @AllArguments Object[] args)
target - the proxy instancemethod - the Method instance corresponding to the proxied
method invoked on the proxy instance.args - an array of objects containing the values of the arguments
passed in the method invocation on the proxy instance.public static <T> T createModelProxy(StateNode stateNode, BeanModelType<T> modelType)
modelType type for the given
state node.T - the proxy typestateNode - the state node, not nullmodelType - the type of the model, not nullnullpublic static StateNode getStateNodeForProxy(Object proxy)
proxy - the template model proxypublic static BeanModelType<?> getModelTypeForProxy(Object proxy)
proxy - the template model proxypublic static boolean isProxy(Object proxy)
proxy - the object to checktrue if the given object is a proxy object,
false otherwiseCopyright © 2025. All rights reserved.