package beanpuree
- Alphabetic
- Public
- Protected
Type Members
- trait BeanConverter[B, P] extends AnyRef
Converts bean to product type (case class) and backwards.
Converts bean to product type (case class) and backwards.
Doesn't care about fields order. The fields have to have compatible types.
- B
bean type
- P
product type type
- See also
- trait BeanGeneric[B] extends AnyRef
Represents an ability to convert bean of type B to generic representation (shapeless.HList).
Represents an ability to convert bean of type B to generic representation (shapeless.HList). This is almost the same with shapeless.Generic, but for JavaBeans. E.g:
public class Cat { private String name; private int age; public String getName() { return name }; public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
Then the BeanGeneric instance will have
Repr=String :: Int :: HNil. Note that the HList order is the same with the bean properties getters declaration order.Now it's possible to convert bean to HList, and then convert HList to something else.
- B
the bean type
- class BeanGenericMacros extends CaseClassMacros with BeanUtils
- trait BeanLabelling[B] extends DepFn0 with Serializable
Represents ability to extract labels, like shapeless.DefaultSymbolicLabelling but for JavaBeans.
Represents ability to extract labels, like shapeless.DefaultSymbolicLabelling but for JavaBeans.
- B
bean to extract labels
- class BeanLabellingMacros extends SingletonTypeUtils with CaseClassMacros with BeanUtils
- trait BeanUtils extends AnyRef
- trait JavaTypeMapper[J, S] extends AnyRef
Converter between Java and Scala types.
Converter between Java and Scala types.
Built in instances to convert Java Integer, Long, Float, Double, BigDecimal, BigInteger, Character, Boolean to corresponding Scala types are provided. If the Java value is null, throws a NullPointerException. There is a converter from any type which can be mapped to scala.Option. For example you can map
IntegertoOption[Int], orStringto Option[String].It also supports shapeless.HLists. E.g. you can convert
Integer :: String :: HNiltoOption[Int] :: String :: HNil.- J
Java type
- S
Scala type
- trait LabelledBeanGeneric[B] extends AnyRef
Similar to BeanGeneric, but like shapeless.LabelledGeneric adds field names information to Repr.
Similar to BeanGeneric, but like shapeless.LabelledGeneric adds field names information to Repr. Field names are calculated from getters. E.g
getLoginDatebecomeloginDate, andisActivebecomeactive.For the bean from the BeanGeneric example the Repr type will be
'name -> String :: 'age -> Int :: HNil.- B
bean type
- trait LowPriorityJavaTypeMapper extends AnyRef
- trait StrictBeanConverter[B, P] extends AnyRef
Converts bean to product type (case class) and backwards.
Converts bean to product type (case class) and backwards.
Doesn't care about fields order. Only requires that the fields have same type and same name.
- B
bean type
- P
product type type
- See also
Value Members
- object BeanConverter
- object BeanGeneric
The companion object for BeanGeneric trait providing the way to obtain BeanGeneric instances.
- object BeanLabelling extends Serializable
- object JavaTypeMapper extends LowPriorityJavaTypeMapper
- object LabelledBeanGeneric
Companion for LabelledBeanGeneric.
Companion for LabelledBeanGeneric. Provides ability to obtain an instance of LabelledBeanGeneric.
- object StrictBeanConverter