You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/06/13 13:11:00 UTC
[jira] [Updated] (GROOVY-8228) JSR308 grammar changes
[ https://issues.apache.org/jira/browse/GROOVY-8228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-8228:
------------------------------
Description:
Potential cases to consider:
{code}
// constructor usage
Forecast currentForecast = new @Interned Forecast()
// type casts
Object myObject = (@NotNull Object) obj
// exceptions
catch (@Critical Exception e) { ... }
// inheritance and generics
class MyForecast<T> implements @NonEmpty List<@ReadOnly T>
// on arrays
// Annotating the int type:
@ReadOnly int [] nums;
// Annotating the array type int[]:
int @ReadOnly [] nums
// Annotating the array type int[][]:
int @ReadOnly [][] nums
// Annotating the type int[], which is a component type of int[][]:
int [] @ReadOnly [] nums
{code}
Adapted mostly from: http://www.oracle.com/technetwork/articles/java/ma14-architect-annotations-2177655.html
was:
Potential cases to consider:
{code}
// constructor usage
Forecast currentForecast = new @Interned Forecast()
// type casts
Object myObject = (@NotNull Object) obj
// exceptions
catch (@Critical Exception e) { ... }
// inheritance and generics
class MyForecast<T> implements @NonEmpty List< @ReadOnly T>
// on arrays
// Annotating the int type:
@ReadOnly int [] nums;
// Annotating the array type int[]:
int @ReadOnly [] nums
// Annotating the array type int[][]:
int @ReadOnly [][] nums
// Annotating the type int[], which is a component type of int[][]:
int [] @ReadOnly [] nums
{code}
Adapted mostly from: http://www.oracle.com/technetwork/articles/java/ma14-architect-annotations-2177655.html
> JSR308 grammar changes
> ----------------------
>
> Key: GROOVY-8228
> URL: https://issues.apache.org/jira/browse/GROOVY-8228
> Project: Groovy
> Issue Type: Sub-task
> Reporter: Paul King
> Assignee: Daniel Sun
>
> Potential cases to consider:
> {code}
> // constructor usage
> Forecast currentForecast = new @Interned Forecast()
> // type casts
> Object myObject = (@NotNull Object) obj
> // exceptions
> catch (@Critical Exception e) { ... }
> // inheritance and generics
> class MyForecast<T> implements @NonEmpty List<@ReadOnly T>
> // on arrays
> // Annotating the int type:
> @ReadOnly int [] nums;
> // Annotating the array type int[]:
> int @ReadOnly [] nums
> // Annotating the array type int[][]:
> int @ReadOnly [][] nums
> // Annotating the type int[], which is a component type of int[][]:
> int [] @ReadOnly [] nums
> {code}
> Adapted mostly from: http://www.oracle.com/technetwork/articles/java/ma14-architect-annotations-2177655.html
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)