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

Examples of org.eclipse.jdt.internal.compiler.lookup.PackageBinding


            .append(getDeclaringClass().getQualifiedName())
            .append('.');
          buffer.append(getName());
          return String.valueOf(buffer);
        }
        PackageBinding packageBinding = this.binding.getPackage();
        buffer = new StringBuffer();
        if (packageBinding != null && packageBinding.compoundName != CharOperation.NO_CHAR_CHAR) {
          buffer.append(CharOperation.concatWith(packageBinding.compoundName, '.')).append('.');
        }
        buffer.append(getName());
View Full Code Here


    this.typeBinding = getTypeBinding(simpleTypeName);
  }

  public void consumePackage(char[] pkgName) {
    this.compoundName = CharOperation.splitOn('/', pkgName);
    this.compilerBinding = new PackageBinding(this.compoundName, null, this.environment);
  }
View Full Code Here

  // receiverType can be an array binding in one case... see if you can change it
  if (receiverType instanceof ArrayBinding)
    return false;
  ReferenceBinding type = (ReferenceBinding) receiverType;
  PackageBinding declaringPackage = fieldBinding.declaringClass.fPackage;
  TypeBinding originalDeclaringClass = fieldBinding.declaringClass .original();
  do {
    if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
      if (originalDeclaringClass == type.erasure().original()) return true
    } else {
View Full Code Here

  // receiverType can be an array binding in one case... see if you can change it
  if (receiverType instanceof ArrayBinding)
    return false;
  ReferenceBinding type = (ReferenceBinding) receiverType;
  PackageBinding declaringPackage = methodBinding.declaringClass.fPackage;
  TypeBinding originalDeclaringClass = methodBinding.declaringClass .original();
  do {
    if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
      if (originalDeclaringClass == type.erasure().original()) return true;
    } else {
View Full Code Here

    return binding;

  int length = compoundName.length;
  int currentIndex = 1;
  foundType: if (binding instanceof PackageBinding) {
    PackageBinding packageBinding = (PackageBinding) binding;

    while (currentIndex < length) {
      binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]);
      invocationSite.setFieldIndex(currentIndex);
       if (binding == null) {
         if (currentIndex == length) // must be a type if its the last name, otherwise we have no idea if its a package or type
          return new ProblemReferenceBinding(CharOperation.subarray(compoundName, 0, currentIndex), null, ProblemReasons.NotFound);
        else
View Full Code Here

        }
        break;
      case PACKAGE :
        // might need to handle javadoc of package-info.java file
        PackageElementImpl packageElementImpl = (PackageElementImpl) e;
        PackageBinding packageBinding = (PackageBinding) packageElementImpl._binding;
        char[][] compoundName = CharOperation.arrayConcat(packageBinding.compoundName, TypeConstants.PACKAGE_INFO_NAME);
        ReferenceBinding type = this._env.getLookupEnvironment().getType(compoundName);
        if (type != null && type.isValidBinding() && (type instanceof SourceTypeBinding)) {
          SourceTypeBinding sourceTypeBinding = (SourceTypeBinding) type;
          referenceContext = sourceTypeBinding.scope.referenceContext;
View Full Code Here

    LookupEnvironment le = _env.getLookupEnvironment();
    if (name.length() == 0) {
      return new PackageElementImpl(_env, le.defaultPackage);
    }
    char[] packageName = name.toString().toCharArray();
    PackageBinding packageBinding = le.createPackage(CharOperation.splitOn('.', packageName));
    if (packageBinding == null) {
      return null;
    }
    return new PackageElementImpl(_env, packageBinding);
  }
View Full Code Here

    this.typeBinding = getTypeBinding(simpleTypeName);
  }

  public void consumePackage(char[] pkgName) {
    this.compoundName = CharOperation.splitOn('/', pkgName);
    this.compilerBinding = new PackageBinding(this.compoundName, null, this.environment);
  }
View Full Code Here

            .append(getDeclaringClass().getQualifiedName())
            .append('.');
          buffer.append(getName());
          return String.valueOf(buffer);
        }
        PackageBinding packageBinding = this.binding.getPackage();
        buffer = new StringBuffer();
        if (packageBinding != null && packageBinding.compoundName != CharOperation.NO_CHAR_CHAR) {
          buffer.append(CharOperation.concatWith(packageBinding.compoundName, '.')).append('.');
        }
        buffer.append(getName());
View Full Code Here

    AnnotationBinding[] annotations = null;
    int length = sourceAnnotations == null ? 0 : sourceAnnotations.length;
    if (recipient != null) {
      switch (recipient.kind()) {
        case Binding.PACKAGE :
          PackageBinding packageBinding = (PackageBinding) recipient;
          if ((packageBinding.tagBits & TagBits.AnnotationResolved) != 0) return annotations;
          packageBinding.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
          break;
        case Binding.TYPE :
        case Binding.GENERIC_TYPE :
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.lookup.PackageBinding

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.