Examples of ISourceType


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

  SourceType[] memberTypeHandles = getMemberTypeHandles();
  int length = memberTypeHandles.length;
  ISourceType[] memberTypes = new ISourceType[length];
  for (int i = 0; i < length; i++) {
    try {
      ISourceType type = (ISourceType) memberTypeHandles[i].getElementInfo();
      memberTypes[i] = type;
    } catch (JavaModelException e) {
      // ignore
    }
  }
View Full Code Here

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

  if (progressMonitor != null && progressMonitor.isCanceled())
    throw new OperationCanceledException();

  // find most enclosing type first (needed when explicit askForType(...) is done
  // with a member type (e.g. p.A$B))
  ISourceType sourceType = sourceTypes[0];
  while (sourceType.getEnclosingType() != null)
    sourceType = sourceType.getEnclosingType();

  // build corresponding compilation unit
  CompilationResult result = new CompilationResult(sourceType.getFileName(), 1, 1, this.options.maxProblemsPerUnit);
  CompilationUnitDeclaration unit =
    SourceTypeConverter.buildCompilationUnit(
      new ISourceType[] {sourceType}, // ignore secondary types, to improve laziness
      SourceTypeConverter.MEMBER_TYPE, // need member types
      // no need for field initialization
View Full Code Here

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

  char separator;
  if (type instanceof IBinaryType) {
    superInterfaceNames = ((IBinaryType)type).getInterfaceNames();
    separator = '/';
  } else if (type instanceof ISourceType) {
    ISourceType sourceType = (ISourceType)type;
    if (sourceType.getName().length == 0) { // if anonymous type
      if (typeBinding.superInterfaces() != null && typeBinding.superInterfaces().length > 0) {
        superInterfaceNames = new char[][] {sourceType.getSuperclassName()};
      } else {
        superInterfaceNames = sourceType.getInterfaceNames();
      }
    } else {
      if (TypeDeclaration.kind(sourceType.getModifiers()) == TypeDeclaration.ANNOTATION_TYPE_DECL)
        superInterfaceNames = new char[][] {TypeConstants.CharArray_JAVA_LANG_ANNOTATION_ANNOTATION};
      else
        superInterfaceNames = sourceType.getInterfaceNames();
    }
    separator = '.';
  } else if (type instanceof HierarchyType) {
    HierarchyType hierarchyType = (HierarchyType)type;
    if (hierarchyType.name.length == 0) { // if anonymous type
View Full Code Here

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

    this.lookupEnvironment.buildTypeBindings(parsedUnit, accessRestriction);
    this.lookupEnvironment.completeTypeBindings(parsedUnit, true);
  }

  public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
    ISourceType sourceType = sourceTypes[0];
    while (sourceType.getEnclosingType() != null)
      sourceType = sourceType.getEnclosingType();
    SourceTypeElementInfo elementInfo = (SourceTypeElementInfo) sourceType;
    IType type = elementInfo.getHandle();
    ICompilationUnit sourceUnit = (ICompilationUnit) type.getCompilationUnit();
    accept(sourceUnit, accessRestriction);   
  }
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.