A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / SingleTypeReference.java
index 5d3cedb..d86c411 100644 (file)
@@ -21,6 +21,7 @@ import org.eclipse.core.resources.IFile;
 
 public class SingleTypeReference extends TypeReference {
        public char[] token;
+
        public IFile file;
 
        public SingleTypeReference(IFile f, char[] source, int start, int end) {
@@ -29,55 +30,68 @@ public class SingleTypeReference extends TypeReference {
                sourceStart = start;
                sourceEnd = end;
 
-}
-public SingleTypeReference(char[] source, long pos) {
+       }
+
+       public SingleTypeReference(char[] source, long pos) {
                token = source;
                file = null;
-               sourceStart = (int) (pos>>>32)  ;
-               sourceEnd = (int) (pos & 0x00000000FFFFFFFFL) ;
+               sourceStart = (int) (pos >>> 32);
+               sourceEnd = (int) (pos & 0x00000000FFFFFFFFL);
 
-}
-public SingleTypeReference(char[] source ,TypeBinding type, long pos) {
-       this(source, pos) ;
-       this.resolvedType = type ;
-}
-public TypeReference copyDims(int dim){
-       //return a type reference copy of me with some dimensions
-       //warning : the new type ref has a null binding
+       }
 
-       return new ArrayTypeReference(token,null,dim,(((long)sourceStart)<<32)+sourceEnd) ;
-}
-public TypeBinding getTypeBinding(Scope scope) {
-       if (this.resolvedType != null)
-               return this.resolvedType;
-       return scope.getType(token);
-}
-public char [][] getTypeName() {
-       return new char[][] { token };
-}
-public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
-       ReferenceBinding memberTb = scope.getMemberType(token, enclosingType);
-       if (!memberTb.isValidBinding()) {
-               scope.problemReporter().invalidEnclosingType(this, memberTb, enclosingType);
-               return null;
+       public SingleTypeReference(char[] source, TypeBinding type, long pos) {
+               this(source, pos);
+               this.resolvedType = type;
        }
-       if (isTypeUseDeprecated(memberTb, scope))
-               scope.problemReporter().deprecatedType(memberTb, this);
-       return this.resolvedType = memberTb;
-}
-public StringBuffer printExpression(int indent, StringBuffer output){
 
-       return output.append(token);
-}
-public String toStringExpression(int tab){
-       return new String(token) ;
-}
-public void traverse(ASTVisitor visitor, BlockScope scope) {
-       visitor.visit(this, scope);
-       visitor.endVisit(this, scope);
-}
-public void traverse(ASTVisitor visitor, ClassScope scope) {
-       visitor.visit(this, scope);
-       visitor.endVisit(this, scope);
-}
+       public TypeReference copyDims(int dim) {
+               // return a type reference copy of me with some dimensions
+               // warning : the new type ref has a null binding
+
+               return new ArrayTypeReference(token, null, dim,
+                               (((long) sourceStart) << 32) + sourceEnd);
+       }
+
+       public TypeBinding getTypeBinding(Scope scope) {
+               if (this.resolvedType != null)
+                       return this.resolvedType;
+               return scope.getType(token);
+       }
+
+       public char[][] getTypeName() {
+               return new char[][] { token };
+       }
+
+       public TypeBinding resolveTypeEnclosing(BlockScope scope,
+                       ReferenceBinding enclosingType) {
+               ReferenceBinding memberTb = scope.getMemberType(token, enclosingType);
+               if (!memberTb.isValidBinding()) {
+                       scope.problemReporter().invalidEnclosingType(this, memberTb,
+                                       enclosingType);
+                       return null;
+               }
+               if (isTypeUseDeprecated(memberTb, scope))
+                       scope.problemReporter().deprecatedType(memberTb, this);
+               return this.resolvedType = memberTb;
+       }
+
+       public StringBuffer printExpression(int indent, StringBuffer output) {
+
+               return output.append(token);
+       }
+
+       public String toStringExpression(int tab) {
+               return new String(token);
+       }
+
+       public void traverse(ASTVisitor visitor, BlockScope scope) {
+               visitor.visit(this, scope);
+               visitor.endVisit(this, scope);
+       }
+
+       public void traverse(ASTVisitor visitor, ClassScope scope) {
+               visitor.visit(this, scope);
+               visitor.endVisit(this, scope);
+       }
 }