public class GroovyPropertyStyle extends BasePropertyStyle
Groovy-style properties can almost be handled using JavaBeanPropertyStyle,
because the Groovy compiler automatically generates JavaBean-style getters and setters.
Unfortunately, it does not also copy any annotations defined on the property to the generated
getter and setters. This PropertyStyle is designed to access those annotations.
mLog| Constructor and Description |
|---|
GroovyPropertyStyle() |
GroovyPropertyStyle(GroovyPropertyStyleConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Property> |
inspectProperties(String type)
Returns properties sorted by name.
|
protected boolean |
isExcludedBaseType(Class<?> classToExclude)
Whether to exclude the given base type when searching up the model inheritance chain.
|
protected boolean |
isExcludedName(String name)
Whether to exclude the given property name when searching for properties.
|
getProperties, getUncachedTraits, traversecacheTraits, clearCache, getCachedTraits, getTraits, isExcluded, isExcludedReturnTypepublic GroovyPropertyStyle()
public GroovyPropertyStyle(GroovyPropertyStyleConfig config)
protected Map<String,Property> inspectProperties(String type)
inspectProperties in class BasePropertyStyleprotected boolean isExcludedBaseType(Class<?> classToExclude)
This can be useful when the convention or base class define properties that are framework-specific, and should be filtered out from 'real' business model properties.
By default, excludes any base types from the org.groovy.* packages, as well as
those excluded by BasePropertyStyle.
isExcludedBaseType in class BaseTraitStyle<Property>protected boolean isExcludedName(String name)
This can be useful when the convention or base class define properties that are framework-specific, and should be filtered out from 'real' business model properties.
By default, excludes 'metaClass'.
isExcludedName in class BaseTraitStyle<Property>name - to consider for exclusionCopyright © 2015. All Rights Reserved.