KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > MemberElementInfo


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.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 org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants
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      * @see org.eclipse.jdt.internal.compiler.env.IGenericType#getModifiers()
38      * @see org.eclipse.jdt.internal.compiler.env.IGenericMethod#getModifiers()
39      * @see org.eclipse.jdt.internal.compiler.env.IGenericField#getModifiers()
40      */

41     public int getModifiers() {
42         return this.flags;
43     }
44     /**
45      * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getNameSourceEnd()
46      * @see org.eclipse.jdt.internal.compiler.env.ISourceMethod#getNameSourceEnd()
47      * @see org.eclipse.jdt.internal.compiler.env.ISourceField#getNameSourceEnd()
48      */

49     public int getNameSourceEnd() {
50         return this.nameEnd;
51     }
52     /**
53      * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getNameSourceStart()
54      * @see org.eclipse.jdt.internal.compiler.env.ISourceMethod#getNameSourceStart()
55      * @see org.eclipse.jdt.internal.compiler.env.ISourceField#getNameSourceStart()
56      */

57     public int getNameSourceStart() {
58         return this.nameStart;
59     }
60     protected void setFlags(int flags) {
61         this.flags = flags;
62     }
63     /**
64      * Sets the last position of this member's name, relative
65      * to its openable's source buffer.
66      */

67     protected void setNameSourceEnd(int end) {
68         this.nameEnd= end;
69     }
70     /**
71      * Sets the start position of this member's name, relative
72      * to its openable's source buffer.
73      */

74     protected void setNameSourceStart(int start) {
75         this.nameStart= start;
76     }
77 }
78
Popular Tags