Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / MemberElementInfo.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
12
13 import net.sourceforge.phpdt.internal.compiler.env.IConstants;
14
15 /**
16  * Element info for IMember elements.
17  */
18 /* package */abstract class MemberElementInfo extends SourceRefElementInfo {
19         /**
20          * The modifiers associated with this member.
21          * 
22          * @see IConstants
23          */
24         protected int flags;
25
26         /**
27          * The start position of this member's name in the its openable's buffer.
28          */
29         protected int nameStart = -1;
30
31         /**
32          * The last position of this member's name in the its openable's buffer.
33          */
34         protected int nameEnd = -1;
35
36         /**
37          * This member's name
38          */
39         protected char[] name;
40
41         /**
42          * @see net.sourceforge.phpdt.internal.compiler.env.IGenericType#getModifiers()
43          * @see net.sourceforge.phpdt.internal.compiler.env.IGenericMethod#getModifiers()
44          * @see net.sourceforge.phpdt.internal.compiler.env.IGenericField#getModifiers()
45          */
46         public int getModifiers() {
47                 return this.flags;
48         }
49
50         /**
51          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getName()
52          */
53         public char[] getName() {
54                 return this.name;
55         }
56
57         /**
58          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getNameSourceEnd()
59          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceMethod#getNameSourceEnd()
60          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceField#getNameSourceEnd()
61          */
62         public int getNameSourceEnd() {
63                 return this.nameEnd;
64         }
65
66         /**
67          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getNameSourceStart()
68          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceMethod#getNameSourceStart()
69          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceField#getNameSourceStart()
70          */
71         public int getNameSourceStart() {
72                 return this.nameStart;
73         }
74
75         protected void setFlags(int flags) {
76                 this.flags = flags;
77         }
78
79         /**
80          * Sets this member's name
81          */
82         protected void setName(char[] name) {
83                 this.name = name;
84         }
85
86         /**
87          * Sets the last position of this member's name, relative to its openable's
88          * source buffer.
89          */
90         protected void setNameSourceEnd(int end) {
91                 this.nameEnd = end;
92         }
93
94         /**
95          * Sets the start position of this member's name, relative to its openable's
96          * source buffer.
97          */
98         protected void setNameSourceStart(int start) {
99                 this.nameStart = start;
100         }
101 }