package votorola.g.lang; // Copyright 2009, 2011, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. import java.lang.annotation.*; /** Conveys a warning. The following standard warnings are documented: * *

Dead code

*
  *     @Warning("dead code")
* *

Warns that a particular piece of code is no longer used, or never was used. It * should be tested and possibly modified before use.

* *

Init call

*
  *     @Warning("init call")
  *         // final method
* *

Warns that the method is called from a constructor or other initializer where the * call is not dynamically bound. Often the method will have a final modifier to * preclude overriding, even if it happens to be private or implicitly final in the * current revision of the code.

* *

Untested

*
  *     @Warning("untested")
* *

Warns that a particular piece of code has never been tested.

* *

Non-API

*
  *     @Warning("non-API")
  *         // non-private member typically
* *

Warns that the member is only for internal use. It is not part of the application * programming interface.

* *

Thread restricted

*
  *     @Warning("thread restricted object")
  *         // field, constructor, method
  *     @Warning("thread restricted elements")
  *         // field, constructor, method that dispenses an array
  *         // or collection of elements
* *

The first version warns that objects read from the field, or created by the * constructor, or returned by the method are not thread safe. Though the field, * constructor or method may itself be thread safe, the objects it dispenses are not. * The programmer is warned to consult the objects' own type API for the detailed * restrictions. (See also @{@linkplain ThreadRestricted ThreadRestricted}.) The * second version provides the same warning, but with regard to the elements of the * object.

* *
  *     @Warning("thread restricted object, restriction")
  *         // field, constructor, method
  *     @Warning("thread restricted elements, restriction")
  *         // field, constructor, method that dispenses an array
  *         // or collection of elements
* *

These are the same as the previous warnings, only they specify the restriction.

*/ @Documented @Retention(RetentionPolicy.SOURCE) @Target({ ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE }) public @interface Warning { /** The description of the warning, if any. */ public String value(); }