|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.navel.beans.DefaultConstructor
public class DefaultConstructor
Does nothing, a Null Pattern so that there is a useable but no-op delegate to call for all proxies created.
Field Summary | |
---|---|
static ConstructionDelegate |
CONSTRUCTOR
|
Method Summary | |
---|---|
java.util.Collection<java.lang.Class<?>> |
additionalTypes(int nestingDepth,
java.lang.Class<?> thisType,
java.lang.Class<?> primaryType,
java.lang.Class<?>[] allTypes,
java.util.Map<java.lang.String,java.lang.Object> initialValues)
Give callers a chance to hook into the ProxyFactory for purposes
of conditionally augmenting the interfaces any given dynamic proxy will
implement based on information made available declaratively through the
create call. |
void |
initBehaviors(int nestingDepth,
java.lang.Class<?> thisType,
java.lang.Object bean)
This code will get invoked any any new Navel been that implements the type for which this instance is registered immediately after the Proxy is created but before the reference is returned out of
ProxyFactory making this suitable to do custom "construction"
work. |
void |
initValues(int nestingDepth,
java.lang.Class<?> thisType,
java.lang.Object bean)
This code will get invoked any any new Navel bean that implements the type for which this instance is registered immediately after the Proxy is created but before the reference is returned out of
ProxyFactory making this suitable to do custom "construction"
work. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ConstructionDelegate CONSTRUCTOR
Method Detail |
---|
public java.util.Collection<java.lang.Class<?>> additionalTypes(int nestingDepth, java.lang.Class<?> thisType, java.lang.Class<?> primaryType, java.lang.Class<?>[] allTypes, java.util.Map<java.lang.String,java.lang.Object> initialValues)
ConstructionDelegate
ProxyFactory
for purposes
of conditionally augmenting the interfaces any given dynamic proxy will
implement based on information made available declaratively through the
create call.
Any kind of copy on ProxyFactory
, including those that produce
unmodifiable beans, will bypass this method on construction as the
contract of copy is to preserve exactly the typing of the source.
additionalTypes
in interface ConstructionDelegate
nestingDepth
- For directly or indirectly recursive relationships between
types, this argument lets the delegate consider nesting depth
as part of its criteria as to whether it should do anything
special.thisType
- This is the type that triggered the call into the delegate,
specifically.primaryType
- The primary type for the Proxy
about to be created,
may or may not match the thisType argument.allTypes
- All of the original types requested, in case the code that
initially invoked create already included an interface of
interest.initialValues
- May be empty, will never be null; allows type augmentation
based on the initial values for a new JavaBeanHandler
.
The value based in will be immutable as this method is not
meant to alter the state of the bean under construction.
Proxy
should implement
or null if no additional interfaces should be added. Any
duplicates from other ConstructionDelegate
instances
invoked before Proxy
creation will be eliminated.ConstructionDelegate.additionalTypes(int,
java.lang.Class, java.lang.Class, java.lang.Class>[],
java.util.Map)
public void initValues(int nestingDepth, java.lang.Class<?> thisType, java.lang.Object bean)
ConstructionDelegate
Proxy
is created but before the reference is returned out of
ProxyFactory
making this suitable to do custom "construction"
work.
The implementer should take care of both direct value initialization on
the bean argument and attachment of any stock PropertyDelegate
instances, as these are both germane to the initial observable state of
the object under construction.
This code will not get invoked during a copy of any kind, this
includes ProxyFactory.unmodifiableObject(Object)
and
ProxyFactory.unmodifiableObjectAs(Class, Object)
.
Copy operations will perform a shallow copy of the source's already
attached PropertyDelegate
instances, so copies will carry forward
synthetic properties consistent with their sources and should prevent any
issues with copy bypassing the call into this method.
initValues
in interface ConstructionDelegate
nestingDepth
- For directly or indirectly recursive relationships between
types, this argument lets the delegate consider nesting depth
as part of its criteria as to whether it should do anything
special.thisType
- This is the type that triggered the call into the delegate,
specifically. Navel will guarantee that it is safe to cast the
bean argument to this type.bean
- Dynamic Proxy
that was just created, provided so that
its state may be initialized as desired.ConstructionDelegate.initValues(int, Class,
Object)
public void initBehaviors(int nestingDepth, java.lang.Class<?> thisType, java.lang.Object bean)
ConstructionDelegate
Proxy
is created but before the reference is returned out of
ProxyFactory
making this suitable to do custom "construction"
work.
The implementer should take care of both direct value initialization on
the bean argument and attachment of any stock PropertyDelegate
instances, as these are both germane to the initial observable state of
the object under construction.
This code will get invoked during a copy of all kinds, this
includes ProxyFactory.unmodifiableObject(Object)
and
ProxyFactory.unmodifiableObjectAs(Class, Object)
.
initBehaviors
in interface ConstructionDelegate
nestingDepth
- For directly or indirectly recursive relationships between
types, this argument lets the delegate consider nesting depth
as part of its criteria as to whether it should do anything
special.thisType
- This is the type that triggered the call into the delegate,
specifically. Navel will guarantee that it is safe to cast the
bean argument to this type.bean
- Dynamic Proxy
that was just created, provided so that
its state may be initialized as desired.ConstructionDelegate.initBehaviors(int,
java.lang.Class, java.lang.Object)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |