Package org.eclipse.jdt.internal.compiler.env

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryType


/**
* @see IType#isEnum()
* @since 3.0
*/
public boolean isEnum() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  return TypeDeclaration.kind(info.getModifiers()) == TypeDeclaration.ENUM_DECL;
}
View Full Code Here


/*
* @see IType#isInterface()
*/
public boolean isInterface() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  switch (TypeDeclaration.kind(info.getModifiers())) {
    case TypeDeclaration.INTERFACE_DECL:
    case TypeDeclaration.ANNOTATION_TYPE_DECL: // annotation is interface too
      return true;
  }
  return false;
View Full Code Here

/**
* @see IType#isAnnotation()
* @since 3.0
*/
public boolean isAnnotation() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  return TypeDeclaration.kind(info.getModifiers()) == TypeDeclaration.ANNOTATION_TYPE_DECL;
}
View Full Code Here

/*
* @see IType#isLocal()
*/
public boolean isLocal() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  return info.isLocal();
}
View Full Code Here

}
/*
* @see IType#isMember()
*/
public boolean isMember() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  return info.isMember();
}
View Full Code Here

    // if type doesn't exist, no matching method can exist
    return null;
  }
}
public IAnnotation[] getAnnotations() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  IBinaryAnnotation[] binaryAnnotations = info.getAnnotations();
  return getAnnotations(binaryAnnotations, info.getTagBits());
}
View Full Code Here

}
/*
* @see IMember#getFlags()
*/
public int getFlags() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  return info.getModifiers() & ~ClassFileConstants.AccSuper;
}
View Full Code Here

/**
* @see IType#getSuperclassTypeSignature()
* @since 3.0
*/
public String getSuperclassTypeSignature() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  char[] genericSignature = info.getGenericSignature();
  if (genericSignature != null) {
    int signatureLength = genericSignature.length;
    // skip type parameters
    int index = 0;
    if (genericSignature[0] == '<') {
      int count = 1;
      while (count > 0 && ++index < signatureLength) {
        switch (genericSignature[index]) {
          case '<':
            count++;
            break;
          case '>':
            count--;
            break;
        }
      }
      index++;
    }
    int start = index;
    index = org.eclipse.jdt.internal.compiler.util.Util.scanClassTypeSignature(genericSignature, start) + 1;
    char[] superclassSig = CharOperation.subarray(genericSignature, start, index);
    return new String(ClassFile.translatedName(superclassSig));
  } else {
    char[] superclassName = info.getSuperclassName();
    if (superclassName == null) {
      return null;
    }
    return new String(Signature.createTypeSignature(ClassFile.translatedName(superclassName), true));
  }
View Full Code Here

/*
* @see IType#getSuperclassName()
*/
public String getSuperclassName() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  char[] superclassName = info.getSuperclassName();
  if (superclassName == null) {
    return null;
  }
  return new String(ClassFile.translatedName(superclassName));
}
View Full Code Here

}
/*
* @see IType#getSuperInterfaceNames()
*/
public String[] getSuperInterfaceNames() throws JavaModelException {
  IBinaryType info = (IBinaryType) getElementInfo();
  char[][] names= info.getInterfaceNames();
  int length;
  if (names == null || (length = names.length) == 0) {
    return CharOperation.NO_STRINGS;
  }
  names= ClassFile.translatedNames(names);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.env.IBinaryType

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.