public class PojoUtilImpl extends AbstractLoggableComponent implements PojoUtil
reflection
.getInstance()
Modifier and Type | Field and Description |
---|---|
private static PojoUtil |
instance |
private PojoDescriptorBuilder |
pojoDescriptorBuilder |
private PojoDescriptorBuilderFactory |
pojoDescriptorBuilderFactory |
Constructor and Description |
---|
PojoUtilImpl()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
protected void |
doInitialized()
This method is invoked at the end of the actual
initialization . |
static PojoUtil |
getInstance()
This method gets the singleton instance of this
PojoUtil . |
protected PojoDescriptorBuilder |
getPojoDescriptorBuilder() |
protected PojoDescriptorBuilderFactory |
getPojoDescriptorBuilderFactory() |
void |
setPojoDescriptorBuilder(PojoDescriptorBuilder pojoDescriptorBuilder) |
void |
setPojoDescriptorBuilderFactory(PojoDescriptorBuilderFactory pojoDescriptorBuilderFactory) |
void |
visitObjectRecursive(Object object,
Filter<Object> visitor)
This method recursively traverses all objects starting from the given
Object via all properties
and contents. |
void |
visitObjectRecursive(Object object,
Filter<Object> visitor,
boolean loopProtection)
This method recursively traverses all objects starting from the given
Object via all properties
and contents. |
protected void |
visitObjectRecursive(Object object,
Filter<Object> visitor,
Set<HashKey<Object>> visitedSet) |
createLogger, getLogger
getInitializationState, initialize
private static PojoUtil instance
private PojoDescriptorBuilderFactory pojoDescriptorBuilderFactory
private PojoDescriptorBuilder pojoDescriptorBuilder
public static PojoUtil getInstance()
PojoUtil
. Cdi.GET_INSTANCE
before using.protected void doInitialized()
AbstractComponent
initialization
. It is called when
AbstractComponent.initialize()
is invoked for the first time after AbstractComponent.doInitialize()
is completed and
initialization-state
has changed to initialized
. super.
AbstractComponent.doInitialized()
.doInitialized
in class AbstractComponent
protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractLoggableComponent
protected PojoDescriptorBuilderFactory getPojoDescriptorBuilderFactory()
PojoDescriptorBuilderFactory
.@Inject public void setPojoDescriptorBuilderFactory(PojoDescriptorBuilderFactory pojoDescriptorBuilderFactory)
pojoDescriptorBuilderFactory
- is the instance of PojoDescriptorBuilderFactory
to
Inject
.protected PojoDescriptorBuilder getPojoDescriptorBuilder()
PojoDescriptorBuilder
.public void setPojoDescriptorBuilder(PojoDescriptorBuilder pojoDescriptorBuilder)
pojoDescriptorBuilder
- is the PojoDescriptorBuilder
to set.public void visitObjectRecursive(Object object, Filter<Object> visitor)
PojoUtil
Object
via all properties
and contents. It simply delegates to PojoUtil.visitObjectRecursive(Object, Filter, boolean)
using
true
for loopProtection
.public void visitObjectRecursive(Object object, Filter<Object> visitor, boolean loopProtection)
PojoUtil
Object
via all properties
and contents. It supports Collection
s, Map
s, Object
arrays
, and Pojo
s. primitive
arrays
for performance reasons. Simply realize this inside your visitor
if you need it.visitObjectRecursive
in interface PojoUtil
object
- is the Object
to traverse recursively.visitor
- is the Filter
invoked
for all traversed
Object
s. If an Object
is not accepted
by this
Filter
the recursion stops at this point.loopProtection
- - true
to collect all visited Object
s in a Set
in order to
prevent infinity loops, false
otherwise (to save performance if no loops are possible for
the given Object
).protected void visitObjectRecursive(Object object, Filter<Object> visitor, Set<HashKey<Object>> visitedSet)
object
- is the Object
to traverse recursively.visitor
- is the Filter
invoked
for all traversed
Object
s. If an Object
is not accepted
by this
Filter
the recursion stops at this point.visitedSet
- is the Set
where to collect all object to visit in order to prevent infinity
loops or null
to disable.visitObjectRecursive(Object, Filter, boolean)
Copyright © 2001–2016 mmm-Team. All rights reserved.