Package

me.limansky

beanpuree

Permalink

package beanpuree

Visibility
  1. Public
  2. All

Type Members

  1. trait AlignByKeys[T <: HList, K <: HList] extends DepFn1[T] with Serializable

    Permalink
  2. trait BeanConverter[B, P] extends AnyRef

    Permalink

    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

    LabelledBeanGeneric, JavaTypeMapper

  3. trait BeanGeneric[B] extends AnyRef

    Permalink

    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

  4. class BeanGenericMacros extends CaseClassMacros with BeanUtils

    Permalink
  5. trait BeanLabelling[B] extends DepFn0 with Serializable

    Permalink

    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

  6. class BeanLabellingMacros extends SingletonTypeUtils with CaseClassMacros with BeanUtils

    Permalink
  7. trait BeanUtils extends AnyRef

    Permalink
  8. trait JavaTypeMapper[J, S] extends AnyRef

    Permalink

    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 Option. For example you can map Integer to Option[Int], or String to Option[String].

    It also supports HLists. E.g. you can convert Integer :: String :: HNil to Option[Int] :: String :: HNil.

    J

    Java type

    S

    Scala type

  9. trait LabelledBeanGeneric[B] extends AnyRef

    Permalink

    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 getLoginDate become loginDate, and isActive become active.

    For the bean from the BeanGeneric example the Repr type will be 'name -> String :: 'age -> Int :: HNil.

    B

    bean type

  10. trait LowPriorityJavaTypeMapper extends AnyRef

    Permalink
  11. trait StrictBeanConverter[B, P] extends AnyRef

    Permalink

    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

    LabelledBeanGeneric

Value Members

  1. object AlignByKeys extends Serializable

    Permalink
  2. object BeanConverter

    Permalink
  3. object BeanGeneric

    Permalink

    The companion object for BeanGeneric trait providing the way to obtain BeanGeneric instances.

  4. object BeanLabelling extends Serializable

    Permalink
  5. object JavaTypeMapper extends LowPriorityJavaTypeMapper

    Permalink
  6. object LabelledBeanGeneric

    Permalink

    Companion for LabelledBeanGeneric.

    Companion for LabelledBeanGeneric. Provides ability to obtain an instance of LabelledBeanGeneric.

  7. object StrictBeanConverter

    Permalink

Ungrouped