[ANN] AutoBoxingPlugin ver 0.7
Changes in 0.7
- Intentions are available in array initializer expressions.
- "Converts wrapper classes to primitive types" intention is extended
to do an appropriate cast. For example,
int i = anObject; => int i = (Integer)anObject).intValue();
- Intentions are available in some binary expressions like <, >, !=.
For example,
if(i != "12") => if(i != Integer.parse("12"))
Plugin URL: http://www.intellij.org/twiki/bin/view/Main/AutoBoxingPlugin
/kesh
请先登录再写评论。
Maybe i do not understand correctly (currently i do not use this plugin),
but why dont you do a cast to "Number"?
int i = anObject; => int i = ((Number) anObject).intValue();
So "anObject" could be of any number type.
Just an idea.
Mario
Mario Ivankovits wrote:
>> - "Converts wrapper classes to primitive types" intention is extended
>>to do an appropriate cast. For example,
>> int i = anObject; => int i = (Integer)anObject).intValue();
Yes, you are right. You can download a new version of the plugin.
Thanks,
/kesh