public class ScalaPropertyStyle extends JavaBeanPropertyStyle
Scala-style properties can almost be handled using JavaBeanPropertyStyle,
but you have to use Scala's BeanProperty annotation everywhere which is cumbersome.
This PropertyStyle is designed to access Scala properties natively.
JavaBeanPropertyStyle.FieldProperty, JavaBeanPropertyStyle.JavaBeanPropertymLog| Constructor and Description |
|---|
ScalaPropertyStyle() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
isGetter(Method method)
Overridden because Scala uses
x() instead of getX() (what they call
a 'getter' versus a 'bean getter'). |
protected String |
isSetter(Method method)
Overridden because Scala uses
foo_$eq( x ) instead of setFoo( x )
(what they call a 'setter' versus a 'bean setter'). |
protected void |
lookupFields(Map<String,Property> properties,
Class<?> clazz)
Overridden because Scala always wraps properties with getter and setter methods.
|
getPrivateField, inspectProperties, lookupGetters, lookupSettersgetProperties, getUncachedTraits, traversecacheTraits, clearCache, getCachedTraits, getTraits, isExcluded, isExcludedBaseType, isExcludedName, isExcludedReturnTypeprotected void lookupFields(Map<String,Property> properties, Class<?> clazz)
lookupFields in class JavaBeanPropertyStyleprotected String isGetter(Method method)
x() instead of getX() (what they call
a 'getter' versus a 'bean getter').isGetter in class JavaBeanPropertyStylemethod - a parameterless method that returns a non-voidprotected String isSetter(Method method)
foo_$eq( x ) instead of setFoo( x )
(what they call a 'setter' versus a 'bean setter').isSetter in class JavaBeanPropertyStylemethod - a single-parametered method. May return non-void (ie. for Fluent interfaces)Copyright © 2015. All Rights Reserved.