Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.constantPoolName()


    this.contents[localContentsOffset++] = (byte) (numberOfInnerClasses >> 8);
    this.contents[localContentsOffset++] = (byte) numberOfInnerClasses;
    for (int i = 0; i < numberOfInnerClasses; i++) {
      ReferenceBinding innerClass = innerClasses[i];
      int accessFlags = innerClass.getAccessFlags();
      int innerClassIndex = this.constantPool.literalIndexForType(innerClass.constantPoolName());
      // inner class index
      this.contents[localContentsOffset++] = (byte) (innerClassIndex >> 8);
      this.contents[localContentsOffset++] = (byte) innerClassIndex;
      // outer class index: anonymous and local have no outer class index
      if (innerClass.isMemberType()) {
View Full Code Here


        if (jarSeparator != -1 && pkgEnd < jarSeparator) // if in a jar and no slash, it is a default package -> pkgEnd should be equal to jarSeparator
          pkgEnd = jarSeparator;
        if (pkgEnd == -1)
          return null;
        IPackageFragment pkg = getPackageFragment(fileName, pkgEnd, jarSeparator);
        char[] constantPoolName = referenceBinding.constantPoolName();
        if (constantPoolName == null) {
          ClassFile classFile = (ClassFile) getClassFile(fileName);
          return classFile == null ? null : (JavaElement) classFile.getType();
        }
        pkgEnd = CharOperation.lastIndexOf('/', constantPoolName);
View Full Code Here

    if (!(typeBinding instanceof ReferenceBinding)) {
      return false;
    }
    ReferenceBinding binding = (ReferenceBinding) typeBinding;
    while (binding != null) {
      if (JSO_CLASS.equals(String.valueOf(binding.constantPoolName()))) {
        return true;
      }
      binding = binding.superclass();
    }
    return false;
View Full Code Here

    this.contents[localContentsOffset++] = (byte) (numberOfInnerClasses >> 8);
    this.contents[localContentsOffset++] = (byte) numberOfInnerClasses;
    for (int i = 0; i < numberOfInnerClasses; i++) {
      ReferenceBinding innerClass = innerClasses[i];
      int accessFlags = innerClass.getAccessFlags();
      int innerClassIndex = this.constantPool.literalIndexForType(innerClass.constantPoolName());
      // inner class index
      this.contents[localContentsOffset++] = (byte) (innerClassIndex >> 8);
      this.contents[localContentsOffset++] = (byte) innerClassIndex;
      // outer class index: anonymous and local have no outer class index
      if (innerClass.isMemberType()) {
View Full Code Here

          return false;
        }
        referenceBinding = (ReferenceBinding) typeBinding;
        referenceBinding2 = (ReferenceBinding) typeBinding2;
        char[] constantPoolName = referenceBinding.constantPoolName();
        char[] constantPoolName2 = referenceBinding2.constantPoolName();
        // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=116833
        if (constantPoolName == null) {
          if (constantPoolName2 != null) {
            return false;
          }
View Full Code Here

      this.contents[this.contentsOffset++] = (byte) (numberOfInnerClasses >> 8);
      this.contents[this.contentsOffset++] = (byte) numberOfInnerClasses;
      for (int i = 0; i < numberOfInnerClasses; i++) {
        ReferenceBinding innerClass = innerClasses[i];
        int accessFlags = innerClass.getAccessFlags();
        int innerClassIndex = this.constantPool.literalIndexForType(innerClass.constantPoolName());
        // inner class index
        this.contents[this.contentsOffset++] = (byte) (innerClassIndex >> 8);
        this.contents[this.contentsOffset++] = (byte) innerClassIndex;
        // outer class index: anonymous and local have no outer class index
        if (innerClass.isMemberType()) {
View Full Code Here

  @Override
  public Name getBinaryName(TypeElement type) {
    TypeElementImpl typeElementImpl = (TypeElementImpl) type;
    ReferenceBinding referenceBinding = (ReferenceBinding) typeElementImpl._binding;
    return new NameImpl(
      CharOperation.replaceOnCopy(referenceBinding.constantPoolName(), '/', '.'));
  }

  /* (non-Javadoc)
   * @see javax.lang.model.util.Elements#getConstantExpression(java.lang.Object)
   */
 
View Full Code Here

          return false;
        }
        referenceBinding = (ReferenceBinding) typeBinding;
        referenceBinding2 = (ReferenceBinding) typeBinding2;
        char[] constantPoolName = referenceBinding.constantPoolName();
        char[] constantPoolName2 = referenceBinding2.constantPoolName();
        // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=116833
        if (constantPoolName == null) {
          if (constantPoolName2 != null) {
            return false;
          }
View Full Code Here

        if (jarSeparator != -1 && pkgEnd < jarSeparator) // if in a jar and no slash, it is a default package -> pkgEnd should be equal to jarSeparator
          pkgEnd = jarSeparator;
        if (pkgEnd == -1)
          return null;
        IPackageFragment pkg = getPackageFragment(fileName, pkgEnd, jarSeparator);
        char[] constantPoolName = referenceBinding.constantPoolName();
        if (constantPoolName == null) {
          ClassFile classFile = (ClassFile) getClassFile(fileName);
          return classFile == null ? null : (JavaElement) classFile.getType();
        }
        pkgEnd = CharOperation.lastIndexOf('/', constantPoolName);
View Full Code Here

    this.contents[localContentsOffset++] = (byte) (numberOfInnerClasses >> 8);
    this.contents[localContentsOffset++] = (byte) numberOfInnerClasses;
    for (int i = 0; i < numberOfInnerClasses; i++) {
      ReferenceBinding innerClass = innerClasses[i];
      int accessFlags = innerClass.getAccessFlags();
      int innerClassIndex = this.constantPool.literalIndexForType(innerClass.constantPoolName());
      // inner class index
      this.contents[localContentsOffset++] = (byte) (innerClassIndex >> 8);
      this.contents[localContentsOffset++] = (byte) innerClassIndex;
      // outer class index: anonymous and local have no outer class index
      if (innerClass.isMemberType()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.