Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.IPackageBinding


    return tbn;
  }

  public static boolean samePackage(ITypeBinding tb0, ITypeBinding tb1) {
    IPackageBinding p0 = TransformUtil.elementPackage(tb0);
    IPackageBinding p1 = TransformUtil.elementPackage(tb1);
    if (p0 == null) {
      return p1 == null;
    }

    return p1 != null && p0.isEqualTo(p1);
View Full Code Here


    return ret.toString();
  }

  public static String packageOf(ITypeBinding tb) {
    IPackageBinding pkg = TransformUtil.elementPackage(tb);
    return pkg == null ? "" : of(pkg);
  }
View Full Code Here

    int parameters = typeName.indexOf('<');
    if (parameters >= 0) {
      typeName = typeName.substring(0, parameters);
    }
    name = new StringBuffer(typeName);
    IPackageBinding packageBinding = typeBinding.getPackage();
    typeBinding = typeBinding.getDeclaringClass();
    while (typeBinding != null) {
      name.insert(0, '$').insert(0, typeBinding.getName());
      typeBinding = typeBinding.getDeclaringClass();
    }
    if (packageBinding != null && !packageBinding.isUnnamed()) {
      name.insert(0, '.').insert(0, packageBinding.getName());
    }
    return name.toString();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.IPackageBinding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.