ma.glasnost.orika.property
Class IntrospectorPropertyResolver

java.lang.Object
  extended by ma.glasnost.orika.property.PropertyResolver
      extended by ma.glasnost.orika.property.IntrospectorPropertyResolver
All Implemented Interfaces:
PropertyResolverStrategy
Direct Known Subclasses:
RegexPropertyResolver

public class IntrospectorPropertyResolver
extends PropertyResolver

IntrospectionPropertyResolver leverages JavaBeans introspector to resolve properties for provided types.

Author:

Field Summary
 
Fields inherited from class ma.glasnost.orika.property.PropertyResolver
ELEMENT_PROPERT_PREFIX, ELEMENT_PROPERT_SUFFIX
 
Constructor Summary
IntrospectorPropertyResolver()
          Constructs a new IntrospectorPropertyResolver which includes public fields as properties
IntrospectorPropertyResolver(boolean includePublicFields)
          Constructs a new IntrospectorPropertyResolver
 
Method Summary
protected  void collectProperties(Class<?> type, Type<?> referenceType, Map<String,Property> properties)
          Collects all properties for the specified type.
 
Methods inherited from class ma.glasnost.orika.property.PropertyResolver
capitalize, collectPublicFieldProperties, getElementProperty, getElementProperty, getIndividualElementProperty, getNestedProperty, getNestedProperty, getProperties, getProperty, getProperty, getProperty, hasTypeParameters, isElementPropertyExpression, isIndividualElementExpression, isInlinePropertyExpression, isNestedPropertyExpression, processProperty, resolveInlineProperty, resolvePropertyType, splitElementProperty, splitNestedProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntrospectorPropertyResolver

public IntrospectorPropertyResolver(boolean includePublicFields)
Constructs a new IntrospectorPropertyResolver

Parameters:
includePublicFields - whether properties for public fields should be processed as properties

IntrospectorPropertyResolver

public IntrospectorPropertyResolver()
Constructs a new IntrospectorPropertyResolver which includes public fields as properties

Method Detail

collectProperties

protected void collectProperties(Class<?> type,
                                 Type<?> referenceType,
                                 Map<String,Property> properties)
Collects all properties for the specified type.

Specified by:
collectProperties in class PropertyResolver
Parameters:
type - the type for which to collect properties
referenceType - the reference type for use in resolving generic parameters as needed
properties - the properties collected for the current type


Copyright © 2013 Glasnost. All Rights Reserved.