KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > soot > xml > PosColorAttribute


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2004 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20 package soot.xml;
21
22 import soot.*;
23
24 public class PosColorAttribute{
25         
26     private ColorAttribute color;
27     private int jimpleStartPos;
28     private int jimpleEndPos;
29     private int javaStartPos;
30     private int javaEndPos;
31     private int javaStartLn;
32     private int javaEndLn;
33     private int jimpleStartLn;
34     private int jimpleEndLn;
35
36     public PosColorAttribute(){
37     }
38
39     public ColorAttribute color(){
40         return color;
41     }
42
43     public void color(ColorAttribute c){
44         color = c;
45     }
46
47     public int jimpleStartPos(){
48         return jimpleStartPos;
49     }
50
51     public void jimpleStartPos(int x){
52         jimpleStartPos = x;
53     }
54
55     public int jimpleEndPos(){
56         return jimpleEndPos;
57     }
58
59     public void jimpleEndPos(int x){
60         jimpleEndPos = x;
61     }
62     
63     public int javaStartPos(){
64         return javaStartPos;
65     }
66
67     public void javaStartPos(int x){
68         javaStartPos = x;
69     }
70
71     public int javaEndPos(){
72         return javaEndPos;
73     }
74
75     public void javaEndPos(int x){
76         javaEndPos = x;
77     }
78     
79     public int jimpleStartLn(){
80         return jimpleStartLn;
81     }
82
83     public void jimpleStartLn(int x){
84         jimpleStartLn = x;
85     }
86
87     public int jimpleEndLn(){
88         return jimpleEndLn;
89     }
90
91     public void jimpleEndLn(int x){
92         jimpleEndLn = x;
93     }
94     
95     public int javaStartLn(){
96         return javaStartLn;
97     }
98
99     public void javaStartLn(int x){
100         javaStartLn = x;
101     }
102
103     public int javaEndLn(){
104         return javaEndLn;
105     }
106
107     public void javaEndLn(int x){
108         javaEndLn = x;
109     }
110
111     public boolean hasColor(){
112         if (color() != null) return true;
113         else return false;
114     }
115 }
116
Popular Tags