KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > detect > DeadLocalStoreProperty


1 package edu.umd.cs.findbugs.detect;
2
3 import edu.umd.cs.findbugs.props.AbstractWarningProperty;
4 import edu.umd.cs.findbugs.props.PriorityAdjustment;
5
6 /**
7  * Warning property for FindDeadLocalStores.
8  *
9  * @author David Hovemeyer
10  */

11 public class DeadLocalStoreProperty extends AbstractWarningProperty {
12     private DeadLocalStoreProperty(String JavaDoc name, PriorityAdjustment priorityAdjustment) {
13         super(name, priorityAdjustment);
14     }
15     
16     /** Store is killed by a subsequent store. */
17     public static final DeadLocalStoreProperty KILLED_BY_SUBSEQUENT_STORE =
18         new DeadLocalStoreProperty("KILLED_BY_SUBSEQUENT_STORE",PriorityAdjustment.LOWER_PRIORITY);
19     /** Dead store is of a defense programming constant value. */
20     public static final DeadLocalStoreProperty DEFENSIVE_CONSTANT_OPCODE =
21         new DeadLocalStoreProperty("DEFENSIVE_CONSTANT_OPCODE",PriorityAdjustment.FALSE_POSITIVE);
22     /** Dead store is likely to be the exception object in an exception handler. */
23     public static final DeadLocalStoreProperty EXCEPTION_HANDLER =
24         new DeadLocalStoreProperty("EXCEPTION_HANDLER",PriorityAdjustment.FALSE_POSITIVE);
25     /** The dead store is an increment. */
26     public static final DeadLocalStoreProperty DEAD_INCREMENT =
27         new DeadLocalStoreProperty("DEAD_INCREMENT",PriorityAdjustment.LOWER_PRIORITY);
28     /** The dead store is an increment: the only one in the method. */
29     public static final DeadLocalStoreProperty SINGLE_DEAD_INCREMENT =
30         new DeadLocalStoreProperty("SINGLE_DEAD_INCREMENT",PriorityAdjustment.RAISE_PRIORITY);
31     /** Dead store is of a newly allocated object. */
32     public static final DeadLocalStoreProperty DEAD_OBJECT_STORE =
33         new DeadLocalStoreProperty("DEAD_OBJECT_STORE",PriorityAdjustment.RAISE_PRIORITY);
34     /** Method contains two stores and multiple loads of this local. */
35     public static final DeadLocalStoreProperty TWO_STORES_MULTIPLE_LOADS =
36         new DeadLocalStoreProperty("TWO_STORES_MULTIPLE_LOADS",PriorityAdjustment.NO_ADJUSTMENT);
37     /** There is only one store of this local. (Maybe it's final?) */
38     public static final DeadLocalStoreProperty SINGLE_STORE =
39         new DeadLocalStoreProperty("SINGLE_STORE",PriorityAdjustment.LOWER_PRIORITY);
40     /** There are no loads of this local. (Maybe it's final?). */
41     public static final DeadLocalStoreProperty NO_LOADS =
42         new DeadLocalStoreProperty("NO_LOADS",PriorityAdjustment.LOWER_PRIORITY);
43     public static final DeadLocalStoreProperty SYNTHETIC_NAME =
44         new DeadLocalStoreProperty("SYNTHETIC_NAME",PriorityAdjustment.AT_MOST_LOW);
45     /** This local is a parameter which is dead on entry to the method. */
46     public static final DeadLocalStoreProperty PARAM_DEAD_ON_ENTRY =
47         new DeadLocalStoreProperty("PARAM_DEAD_ON_ENTRY",PriorityAdjustment.RAISE_PRIORITY_TO_HIGH);
48     /** Name of the local variable. */
49     public static final DeadLocalStoreProperty LOCAL_NAME =
50         new DeadLocalStoreProperty("LOCAL_NAME",PriorityAdjustment.NO_ADJUSTMENT);
51
52     /** Caching value */
53     public static final DeadLocalStoreProperty CACHING_VALUE =
54         new DeadLocalStoreProperty("CACHING_VALUE", PriorityAdjustment.LOWER_PRIORITY);
55     /** many stores */
56     public static final DeadLocalStoreProperty MANY_STORES =
57         new DeadLocalStoreProperty("MANY_STORES", PriorityAdjustment.LOWER_PRIORITY);
58     
59     public static final DeadLocalStoreProperty STORE_OF_NULL =
60         new DeadLocalStoreProperty("STORE_OF_NULL", PriorityAdjustment.LOWER_PRIORITY);
61
62 }
63
Popular Tags