A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / lookup / MemberTypeBinding.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.compiler.lookup;
12
13 import net.sourceforge.phpdt.core.compiler.CharOperation;
14
15 public final class MemberTypeBinding extends NestedTypeBinding {
16         public MemberTypeBinding(char[][] compoundName, ClassScope scope,
17                         SourceTypeBinding enclosingType) {
18                 super(compoundName, scope, enclosingType);
19                 this.tagBits |= MemberTypeMask;
20         }
21
22         void checkSyntheticArgsAndFields() {
23                 if (this.isStatic())
24                         return;
25                 if (this.isInterface())
26                         return;
27                 this.addSyntheticArgumentAndField(this.enclosingType);
28         }
29
30         /*
31          * Answer the receiver's constant pool name.
32          * 
33          * NOTE: This method should only be used during/after code gen.
34          */
35
36         public char[] constantPoolName() /* java/lang/Object */{
37                 if (constantPoolName != null)
38                         return constantPoolName;
39
40                 return constantPoolName = CharOperation.concat(enclosingType()
41                                 .constantPoolName(), sourceName, '$');
42         }
43
44         public String toString() {
45                 return "Member type : " + new String(sourceName()) + " " + super.toString(); //$NON-NLS-2$ //$NON-NLS-1$
46         }
47 }