Skip to content

Commit 8af68fc

Browse files
committed
operatorRev readme
1 parent 04c3d09 commit 8af68fc

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ public class Test {
3030
```
3131
# Versions #
3232

33-
JavaC/Netbeans: 0.4
34-
JavaC8: 0.1.1
33+
JavaC/Netbeans: 0.5
34+
JavaC8: 0.5
3535
Eclipse: 0.4
36-
IntelliJ IDEA: 0.3.1
36+
IntelliJ IDEA: 0.4
3737

3838
# News #
39+
2 December 2014. New feature: [Reverse binary operator overload via `operatorRev` methods][operatorRev].<br/>
40+
Plugin versions updated: <br/>
41+
JavaC7 & JavaC8: 0.5 <br/>
42+
IntelliJ IDEA: 0.4. Support of IDEA 14
43+
3944
31 May 2014. Javac8 plugin version 0.1.1 released. Removed runtime depencendy on nbjavac.
4045

4146
24 May 2014. [IntelliJ IDEA](#IDEA) plugin v0.3.1 released. Bugfixes for IDEA 13 Ultimate and for type resolution for binary expressions with primitives.
@@ -93,7 +98,7 @@ For other project types: <br/>
9398
3. Enable Annotation Processing:
9499
`Menu File -> Settings -> Compiler -> Annotation Processing -> Enable annotation processing`
95100
4. Make sure you use `javac` compiler in `Settings -> Java Compiler -> Use compiler`. <br/>
96-
Tested on IDEA 12.1.3 Community and Ultimate Editions.
101+
Tested on IDEA 14.0.1 Community and Ultimate Editions.
97102

98103
### Android project in IDEA 12 ###
99104
Add [javac-oo-plugin.jar] to `File - Settings - Compiler - Annotation Processors - Processor path`
@@ -106,7 +111,7 @@ repositories {
106111
maven { url 'http://amelentev.github.io/mvnrepo/' }
107112
}
108113
dependencies {
109-
compile 'java-oo:javac-oo-plugin:0.4'
114+
compile 'java-oo:javac-oo-plugin:0.5'
110115
}
111116
```
112117

@@ -134,6 +139,9 @@ binary:
134139
| << | shiftLeft |
135140
| >> | shiftRight |
136141

142+
If left operand has no such method then the plugin will try to use ['reverse' method `<methodName>Rev`][operatorRev] on right operand.
143+
So `2*a` will be transformed to `a.multiplyRev(2)` if `a` has such method.
144+
137145
unary:
138146

139147
| - | negate |
@@ -209,3 +217,4 @@ use operators on them "out of the box". Or you can add these methods to your cla
209217
[idea-oo-plugin.jar]: http://amelentev.github.io/mvnrepo/java-oo/idea-oo-plugin/idea-oo-plugin-0.3.1.jar
210218
[IJPLA]: http://airccse.org/journal/ijpla/current2014.html#apr
211219
[paper]: https://github.com/amelentev/java-oo/raw/master/doc/ijpla.pdf
220+
[operatorRev]: https://github.com/amelentev/java-oo/issues/25

0 commit comments

Comments
 (0)