artisanal-pickle-maker


License

License

GroupId

GroupId

com.julianpeeters
ArtifactId

ArtifactId

artisanal-pickle-maker_2.11
Last Version

Last Version

0.10.1
Release Date

Release Date

Type

Type

jar
Description

Description

artisanal-pickle-maker
artisanal-pickle-maker
Project URL

Project URL

https://github.com/julianpeeters/artisanal-pickle-maker
Project Organization

Project Organization

com.julianpeeters

Download artisanal-pickle-maker_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.julianpeeters/artisanal-pickle-maker_2.11/ -->
<dependency>
    <groupId>com.julianpeeters</groupId>
    <artifactId>artisanal-pickle-maker_2.11</artifactId>
    <version>0.10.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.julianpeeters/artisanal-pickle-maker_2.11/
implementation 'com.julianpeeters:artisanal-pickle-maker_2.11:0.10.1'
// https://jarcasting.com/artifacts/com.julianpeeters/artisanal-pickle-maker_2.11/
implementation ("com.julianpeeters:artisanal-pickle-maker_2.11:0.10.1")
'com.julianpeeters:artisanal-pickle-maker_2.11:jar:0.10.1'
<dependency org="com.julianpeeters" name="artisanal-pickle-maker_2.11" rev="0.10.1">
  <artifact name="artisanal-pickle-maker_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.julianpeeters', module='artisanal-pickle-maker_2.11', version='0.10.1')
)
libraryDependencies += "com.julianpeeters" % "artisanal-pickle-maker_2.11" % "0.10.1"
[com.julianpeeters/artisanal-pickle-maker_2.11 "0.10.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-compiler jar 2.11.4
org.scala-lang : scala-library jar 2.11.4

test (2)

Group / Artifact Type Version
org.specs2 : specs2_2.11 jar 2.4
com.novus : salat_2.11 jar 1.9.9

Project Modules

There are no modules declared in this project.

Artisanal-Pickle-Maker

Make your own Scala pickled signatures.

Takes class info as strings and gives back pickled Scala signatures. For use with Java bytecode engineering libraries.

Why? Because existing Java bytecode-engineering tools can't see or alter a pickled Scala signature, thus the altered classes are incomplete in cases where Scala code has no Java equivalent. Artisanal-Pickle-Maker hopes to solve this by updating an altered class's Scala signtature to reflect changes made to the bytecode.

##Usage:## Available for Scala 2.11 (see branches for other supported versions). Build Status

Add the following dependency to your build.sbt file:

libraryDependencies += "com.julianpeeters" %% "artisanal-pickle-maker" % "0.10.1"

Get an artisanal.pickle.maker.ScalaSig with:

val scalaSig = new ScalaSig(List("case class"), List("mypackage", "MyRecord"), List(("x", "String"), ("y", "Option[Int]"))

scalaSig.bytes gives the encoded bytes as a UTF-8 String. This is the normal storage format of a natural pickled Scala signature.

Thus, scalaSig.bytes is identical to the encoded string that would be found in the ScalaSignature annotation of the conventionally defined class:

    `package models`
    `case class MyRecord(x: String, y: Option[Int])`

##Currently supports:## Are you generating or modifying Scala classes with ASM or another bytecode engineering library? Then add an updated pickled sig and make your class whole!

Classes - The generation of Scala sigs for regular and case classes that have value members only (signatures will not reflect user-defined defs, i.e., this doesn't yet support classes with defs due to concerns of hygiene).

Datatypes -

  • Byte
  • Short
  • Int
  • Long
  • Float
  • Double
  • Char
  • String
  • Boolean
  • Null
  • Nothing
  • Any
  • AnyRef
  • List
  • Option
  • user-defined (i.e. other classes)

##In the future:##

Datatypes - Support for more collections besides just List and Option

Extension - Support for flags that allow arbitrary extension (?)

Classes - Support for flags other than "case class" (?)

##Constructive advice is appreciated!##

Versions

Version
0.10.1
0.10.0