Examples of IBinaryType


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

          }
        }
      } else {
        // cache binary type binding
        ClassFile classFile = (ClassFile)openable;
        IBinaryType binaryType = null;
        if (classFile.isOpen()) {
          // create binary type from info
          IType type = classFile.getType();
          try {
            binaryType = (IBinaryType)((JavaElement)type).getElementInfo();
View Full Code Here

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

        this.context,
        getMapper().startPosOffset,
        getMapper().startPosOffset + this.codeSnippet.length - 1);
    ((CodeSnippetParser) compiler.parser).lineSeparatorLength = this.context.lineSeparator.length();
    // Initialize the compiler's lookup environment with the already compiled super classes
    IBinaryType binary = this.context.getRootCodeSnippetBinary();
    if (binary != null) {
      compiler.lookupEnvironment.cacheBinaryType(binary, null /*no access restriction*/);
    }
    VariablesInfo installedVars = this.context.installedVars;
    if (installedVars != null) {
View Full Code Here

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

  this.cuToHandle.put(unit, handle);
  return unit;
}
protected IBinaryType createInfoFromClassFile(Openable classFile, IResource file) {
  String documentPath = classFile.getPath().toString();
  IBinaryType binaryType = (IBinaryType)this.binariesFromIndexMatches.get(documentPath);
  if (binaryType != null) {
    this.infoToHandle.put(binaryType, classFile);
    return binaryType;
  } else {
    return super.createInfoFromClassFile(classFile, file);
View Full Code Here

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

  IPackageFragmentRoot root = classFile.getPackageFragmentRoot();
  IPath path = root.getPath();
  // take the OS path for external jars, and the forward slash path for internal jars
  String rootPath = path.getDevice() == null ? path.toString() : path.toOSString();
  String documentPath = rootPath + IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR + filePath;
  IBinaryType binaryType = (IBinaryType)this.binariesFromIndexMatches.get(documentPath);
  if (binaryType != null) {
    this.infoToHandle.put(binaryType, classFile);
    return binaryType;
  } else {
    return super.createInfoFromClassFileInJar(classFile);
View Full Code Here

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

  /**
* Creates the type info from the given class file on disk and
* adds it to the given list of infos.
*/
protected IBinaryType createInfoFromClassFile(Openable handle, IResource file) {
  IBinaryType info = null;
  try {
    info = Util.newClassFileReader(file);
  } catch (org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException e) {
    if (TypeHierarchy.DEBUG) {
      e.printStackTrace();
View Full Code Here

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

* Create a type info from the given class file in a jar and adds it to the given list of infos.
*/
protected IBinaryType createInfoFromClassFileInJar(Openable classFile) {
  PackageFragment pkg = (PackageFragment) classFile.getParent();
  String classFilePath = Util.concatWith(pkg.names, classFile.getElementName(), '/');
  IBinaryType info = null;
  java.util.zip.ZipFile zipFile = null;
  try {
    zipFile = ((JarPackageFragmentRoot)pkg.getParent()).getJar();
    info = org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(
      zipFile,
View Full Code Here

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

  IField field = type.getField(new String(bindingName));
  if (knownFields.addIfNotIncluded(field) == null) return;

  IResource resource = type.getResource();
  boolean isBinary = type.isBinary();
  IBinaryType info = null;
  if (isBinary) {
    if (resource == null)
      resource = type.getJavaProject().getProject();
    info = locator.getBinaryInfo((org.aspectj.org.eclipse.jdt.internal.core.ClassFile) type.getClassFile(), resource);
    locator.reportBinaryMemberDeclaration(resource, field, fieldBinding, info, SearchMatch.A_ACCURATE);
View Full Code Here

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

  IType type = locator.lookupType(typeBinding);
  if (type == null) return; // case of a secondary type

  IResource resource = type.getResource();
  boolean isBinary = type.isBinary();
  IBinaryType info = null;
  if (isBinary) {
    if (resource == null)
      resource = type.getJavaProject().getProject();
    info = locator.getBinaryInfo((org.aspectj.org.eclipse.jdt.internal.core.ClassFile) type.getClassFile(), resource);
  }
View Full Code Here

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

            break;
          case IPackageFragmentRoot.K_BINARY:
            NameEnvironmentAnswer answer =
              nameEnvironment.findType(TypeConstants.PACKAGE_INFO_NAME, this.binding.compoundName);
            if (answer != null && answer.isBinaryType()) {
              IBinaryType type = answer.getBinaryType();
              IBinaryAnnotation[] binaryAnnotations = type.getAnnotations();
              org.aspectj.org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] binaryInstances =
                BinaryTypeBinding.createAnnotations(binaryAnnotations, this.binding.environment);
              org.aspectj.org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] allInstances =
                org.aspectj.org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding.addStandardAnnotations(binaryInstances, type.getTagBits(), this.binding.environment);
              int total = allInstances.length;
              IAnnotationBinding[] domInstances = new AnnotationBinding[total];
              for (int a = 0; a < total; a++) {
                final IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(allInstances[a]);
                if (annotationInstance == null) {// not resolving binding
View Full Code Here

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

  // check whether the class file can be opened
  IStatus status = validateClassFile();
  if (!status.isOK()) throw newJavaModelException(status);
  if (underlyingResource != null && !underlyingResource.isAccessible()) throw newNotPresentException();

  IBinaryType typeInfo = getBinaryTypeInfo((IFile) underlyingResource);
  if (typeInfo == null) {
    // The structure of a class file is unknown if a class file format errors occurred
    //during the creation of the diet class file representative of this ClassFile.
    info.setChildren(new IJavaElement[] {});
    return false;
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.