new version with WorkingCopy Management
[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 /** 
14  *Element info for IMember elements. 
15  */
16 /* package */ abstract class MemberElementInfo extends SourceRefElementInfo {
17         /**
18          * The modifiers associated with this member.
19          *
20          * @see IConstants
21          */
22         protected int flags;
23
24         /**
25          * The start position of this member's name in the its
26          * openable's buffer.
27          */
28         protected int nameStart= -1;
29
30         /**
31          * The last position of this member's name in the its
32          * openable's buffer.
33          */
34         protected int nameEnd= -1;
35
36         /**
37          * This member's name
38          */
39         protected char[] name;
40         /**
41          * @see org.eclipse.jdt.internal.compiler.env.IGenericType#getModifiers()
42          * @see org.eclipse.jdt.internal.compiler.env.IGenericMethod#getModifiers()
43          * @see org.eclipse.jdt.internal.compiler.env.IGenericField#getModifiers()
44          */
45         public int getModifiers() {
46                 return this.flags;
47         }
48         /**
49          * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getName()
50          */
51         public char[] getName() {
52                 return this.name;
53         }
54         /**
55          * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getNameSourceEnd()
56          * @see org.eclipse.jdt.internal.compiler.env.ISourceMethod#getNameSourceEnd()
57          * @see org.eclipse.jdt.internal.compiler.env.ISourceField#getNameSourceEnd()
58          */
59         public int getNameSourceEnd() {
60                 return this.nameEnd;
61         }
62         /**
63          * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getNameSourceStart()
64          * @see org.eclipse.jdt.internal.compiler.env.ISourceMethod#getNameSourceStart()
65          * @see org.eclipse.jdt.internal.compiler.env.ISourceField#getNameSourceStart()
66          */
67         public int getNameSourceStart() {
68                 return this.nameStart;
69         }
70         protected void setFlags(int flags) {
71                 this.flags = flags;
72         }
73         /**
74          * Sets this member's name
75          */
76         protected void setName(char[] name) {
77                 this.name= name;
78         }
79         /**
80          * Sets the last position of this member's name, relative
81          * to its openable's source buffer.
82          */
83         protected void setNameSourceEnd(int end) {
84                 this.nameEnd= end;
85         }
86         /**
87          * Sets the start position of this member's name, relative
88          * to its openable's source buffer.
89          */
90         protected void setNameSourceStart(int start) {
91                 this.nameStart= start;
92         }
93 }