|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.pojo.descriptor.base.AbstractPojoDescriptorBuilder
net.sf.mmm.util.pojo.descriptor.impl.PojoDescriptorBuilderImpl
@Singleton public class PojoDescriptorBuilderImpl
This is the generic implementation of the
PojoDescriptorBuilder interface.
| Field Summary | |
|---|---|
private ExtendedPojoDescriptorDependenciesImpl |
configuration
|
private PojoFieldIntrospector |
fieldIntrospector
|
private PojoMethodIntrospector |
methodIntrospector
|
| Constructor Summary | |
|---|---|
PojoDescriptorBuilderImpl()
The constructor. |
|
PojoDescriptorBuilderImpl(MapFactory mapFactory)
The constructor. |
|
| Method Summary | ||
|---|---|---|
protected
|
createDescriptor(GenericType<P> pojoType)
This method creates the pojo descriptor
for the given pojoType. |
|
protected void |
doInitialize()
This method performs the actual initialization. |
|
protected Collection<PojoPropertyAccessorBuilder<?>> |
getAccessorBuilders()
This method gets the accessor-builders used to create the accessors for
properties of a POJO. |
|
protected ExtendedPojoDescriptorDependenciesImpl |
getDependencies()
This method gets the ExtendedPojoDescriptorDependenciesImpl. |
|
PojoDescriptorEnhancer |
getDescriptorEnhancer()
This method gets the PojoDescriptorEnhancer to use. |
|
protected PojoFieldIntrospector |
getFieldIntrospector()
This method gets the introspector used to find potential fields for accessing
properties of a POJO. |
|
protected PojoMethodIntrospector |
getMethodIntrospector()
This method gets the introspector used to find potential methods for accessing
properties of a POJO. |
|
protected void |
logDuplicateAccessor(PojoPropertyAccessor accessor,
PojoPropertyAccessor duplicate)
This method is called if the accessor given by
duplicate was ignored because it has the same
name and
mode as the given
accessor that is already registered. |
|
protected boolean |
registerAccessor(PojoDescriptorImpl<?> descriptor,
PojoPropertyAccessor accessor)
This method registers the given accessor for the given
descriptor. |
|
void |
setConfiguration(ExtendedPojoDescriptorDependenciesImpl configuration)
This method sets the ExtendedPojoDescriptorDependenciesImpl. |
|
void |
setFieldIntrospector(PojoFieldIntrospector introspector)
This method sets the field-introspector. |
|
void |
setMethodIntrospector(PojoMethodIntrospector introspector)
This method sets the method-introspector. |
|
| Methods inherited from class net.sf.mmm.util.pojo.descriptor.base.AbstractPojoDescriptorBuilder |
|---|
getDescriptor, getDescriptor, getDescriptor, pojo2Map |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent |
|---|
getLogger, setLogger |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent |
|---|
doInitialized, getInitializationState, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ExtendedPojoDescriptorDependenciesImpl configuration
getDependencies()private PojoMethodIntrospector methodIntrospector
getMethodIntrospector()private PojoFieldIntrospector fieldIntrospector
getFieldIntrospector()| Constructor Detail |
|---|
public PojoDescriptorBuilderImpl()
methods that
are public and NOT static.AbstractComponent.initialize() this component before it can be used.
public PojoDescriptorBuilderImpl(MapFactory mapFactory)
methods that
are public and NOT static.AbstractComponent.initialize() this component before it can be used.
mapFactory - is the factory used to create the descriptor cache.| Method Detail |
|---|
protected void doInitialize()
initialization. It is
called when AbstractComponent.initialize() is invoked for the first time.super.AbstractComponent.doInitialize().
doInitialize in class AbstractLoggableComponentprotected PojoMethodIntrospector getMethodIntrospector()
methods for accessing
properties of a POJO.
@Inject public void setMethodIntrospector(PojoMethodIntrospector introspector)
method-introspector.
introspector - the introspector to set.protected PojoFieldIntrospector getFieldIntrospector()
fields for accessing
properties of a POJO.
@Inject public void setFieldIntrospector(PojoFieldIntrospector introspector)
field-introspector.
introspector - the introspector to set.protected Collection<PojoPropertyAccessorBuilder<?>> getAccessorBuilders()
accessors for
properties of a POJO.
public PojoDescriptorEnhancer getDescriptorEnhancer()
PojoDescriptorEnhancer to use.
PojoDescriptorEnhancer.protected ExtendedPojoDescriptorDependenciesImpl getDependencies()
ExtendedPojoDescriptorDependenciesImpl.
getDependencies in class AbstractPojoDescriptorBuilderExtendedPojoDescriptorDependenciesImpl.@Inject public void setConfiguration(ExtendedPojoDescriptorDependenciesImpl configuration)
ExtendedPojoDescriptorDependenciesImpl.
configuration - is the ExtendedPojoDescriptorDependenciesImpl
.
protected boolean registerAccessor(PojoDescriptorImpl<?> descriptor,
PojoPropertyAccessor accessor)
accessor for the given
descriptor.
descriptor - is the
PojoDescriptor.accessor - is the PojoPropertyAccessor to register.
true if the given accessor has been
registered or false if it has been ignored (it is a
duplicate).protected <P> PojoDescriptorImpl<P> createDescriptor(GenericType<P> pojoType)
pojo descriptor
for the given pojoType.
createDescriptor in class AbstractPojoDescriptorBuilderP - is the templated type of the pojoType.pojoType - is the GenericType reflecting the
Pojo.
Pojo.PojoDescriptorBuilder.getDescriptor(java.lang.Class)
protected void logDuplicateAccessor(PojoPropertyAccessor accessor,
PojoPropertyAccessor duplicate)
accessor given by
duplicate was ignored because it has the same
name and
mode as the given
accessor that is already registered. This method does nothing.
It may be overridden to do some debug logging.
accessor - is the accessor that is already registered.duplicate - is the duplicate that has been ignored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||