KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > form > codestructure > CodeVariable


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.form.codestructure;
21
22 import java.util.Collection JavaDoc;
23
24 /**
25  * @author Tomas Pavek
26  */

27
28 public interface CodeVariable {
29
30     // variable type constants
31

32     // variable scope type (bits 12, 13)
33
public static final int NO_VARIABLE = 0x0000; // means just name reserved
34
public static final int LOCAL = 0x1000;
35     public static final int FIELD = 0x2000;
36
37     // access modifiers - conforms to Modifier class (bits 0, 1, 2)
38
public static final int PUBLIC = 0x0001;
39     public static final int PRIVATE = 0x0002;
40     public static final int PROTECTED = 0x0004;
41     public static final int PACKAGE_PRIVATE = 0x0000;
42
43     // other modifiers - conforms to Modifier class (bits 3, 4, 6, 7)
44
public static final int STATIC = 0x0008;
45     public static final int FINAL = 0x0010;
46     public static final int VOLATILE = 0x0040;
47     public static final int TRANSIENT = 0x0080;
48
49     public static final int NO_MODIFIER = 0x0000;
50
51     // explicit local variable declaration in code (bit 14)
52
public static final int EXPLICIT_DECLARATION = 0x4000;
53
54     // variable management according to number of expressions attached (bit 15)
55
public static final int EXPLICIT_RELEASE = 0x8000;
56
57     // masks
58
public static final int SCOPE_MASK = 0x3000;
59     public static final int ACCESS_MODIF_MASK = 0x0007;
60     public static final int OTHER_MODIF_MASK = 0x00D8;
61     public static final int ALL_MODIF_MASK = 0x00DF;
62     public static final int DECLARATION_MASK = 0x4000;
63     public static final int RELEASE_MASK = 0x8000;
64     public static final int ALL_MASK = 0xF0DF;
65
66     static final int DEFAULT_TYPE = SCOPE_MASK | ALL_MODIF_MASK; // 0x30DF;
67

68     // ------
69

70     public int getType();
71
72     public Class JavaDoc getDeclaredType();
73
74     public String JavaDoc getName();
75
76     public Collection JavaDoc getAttachedExpressions();
77
78     public CodeStatement getDeclaration();
79
80     public CodeStatement getAssignment(CodeExpression expression);
81 }
82
Popular Tags