improved PHP parser
[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
28          * openable's buffer.
29          */
30         protected int nameStart= -1;
31
32         /**
33          * The last position of this member's name in the its
34          * openable's buffer.
35          */
36         protected int nameEnd= -1;
37
38         /**
39          * This member's name
40          */
41         protected char[] name;
42         /**
43          * @see net.sourceforge.phpdt.internal.compiler.env.IGenericType#getModifiers()
44          * @see net.sourceforge.phpdt.internal.compiler.env.IGenericMethod#getModifiers()
45          * @see net.sourceforge.phpdt.internal.compiler.env.IGenericField#getModifiers()
46          */
47         public int getModifiers() {
48                 return this.flags;
49         }
50         /**
51          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getName()
52          */
53         public char[] getName() {
54                 return this.name;
55         }
56         /**
57          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getNameSourceEnd()
58          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceMethod#getNameSourceEnd()
59          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceField#getNameSourceEnd()
60          */
61         public int getNameSourceEnd() {
62                 return this.nameEnd;
63         }
64         /**
65          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getNameSourceStart()
66          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceMethod#getNameSourceStart()
67          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceField#getNameSourceStart()
68          */
69         public int getNameSourceStart() {
70                 return this.nameStart;
71         }
72         protected void setFlags(int flags) {
73                 this.flags = flags;
74         }
75         /**
76          * Sets this member's name
77          */
78         protected void setName(char[] name) {
79                 this.name= name;
80         }
81         /**
82          * Sets the last position of this member's name, relative
83          * to its openable's source buffer.
84          */
85         protected void setNameSourceEnd(int end) {
86                 this.nameEnd= end;
87         }
88         /**
89          * Sets the start position of this member's name, relative
90          * to its openable's source buffer.
91          */
92         protected void setNameSourceStart(int start) {
93                 this.nameStart= start;
94         }
95 }