Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fork of Lombok. Experiments with Operator Overloading and @Inline for inlining methods
Java Other

This branch is 13 commits ahead, 573 commits behind rzwitserloot:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
buildScripts
doc
experimental
src
test
usage_examples
website
winsrc
.gitignore
AUTHORS
LICENSE
README
build.xml

README

This is fork of projectlombok for experiments.

Operator Overloading:
 branch operatorOverloading

 Implementation of (Scala-like) Operator Overloading for Java language.
 Works with javac and Eclipse IDE.
 Works partially with Netbeans on maven based projects.

 Example (See also: ./usage_examples/OperatorOverload_post.jpage):

	import java.math.BigInteger;
	public class Test {
		public static void main(String[] args) {
			BigInteger  a = BigInteger.valueOf(1),
				b = BigInteger.valueOf(2),
				c = a + b*a;
			System.out.println(c);
		}
	}

 Here `a+b*a` will be transformed to `a.add(b.multiply(a))`.

 Map operator to method:
	binary:
		"+" - "add",
		"-" - "subtract",
		"*" - "multiply",
		"/" - "divide",
		"%" - "remainder",
		"&" - "and",
		"|" - "or",
		"^" - "xor",
		"<<" - "shiftLeft",
		">>" - "shiftRight"
	unary:
		"-" - "negate"
		"~" - "not"
	compare:
		"<","<=",">",">=" - "compareTo"
 These methods exists in many java classes (ex:BigInteger) so you can
 use operators on them "out of the box".


Methods inlining:
 branch inline
 outdated


Original README:

projectlombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code.
See LICENSE for the project lombok license.


To start, run:

ant -projecthelp

HINT: If you'd like to develop lombok in eclipse, run 'ant eclipse' first. It creates the necessary project infrastructure and downloads dependencies.

Project Authors:

Reinier Zwitserloot
twitter: @surial
home: http://zwitserloot.com/

Roel Spilker
twitter: @rspilker
Something went wrong with that request. Please try again.