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

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


    InvocationSite invocationSite = CompletionEngine.FakeInvocationSite;

    boolean staticsOnly = false;
    // need to know if we're in a static context (or inside a constructor)

    Scope currentScope = scope;

    done1 : while (true) { // done when a COMPILATION_UNIT_SCOPE is found

      switch (currentScope.kind) {
View Full Code Here


  }

  public boolean canUseDiamond(String[] parameterTypes, char[] fullyQualifiedTypeName) {
    TypeBinding guessedType = null;
    char[][] cn = CharOperation.splitOn('.', fullyQualifiedTypeName);
    Scope scope = this.assistScope;
    if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_7) return false;
    // If no LHS or return type expected, then we can safely use diamond
    char[][] expectedTypekeys= this.completionContext.getExpectedTypesKeys();
    if (expectedTypekeys == null || expectedTypekeys.length == 0)
      return true;
    // Next, find out whether any of the constructor parameters are the same as one of the
View Full Code Here

    VariableBinding binding,
    Reference finalAssignment) {

    // do not consider variables which are defined inside this loop
    if (binding instanceof LocalVariableBinding) {
      Scope scope = ((LocalVariableBinding) binding).declaringScope;
      while ((scope = scope.parent) != null) {
        if (scope == this.associatedScope)
          return false;
      }
    }
View Full Code Here

        if (outerTrackerScope == scope) {
          // outerTracker is from same scope and already processed -> pick trackingVar now
          break;
        } else {
          // outer resource is from other (outer?) scope
          Scope currentScope = scope;
          while ((currentScope = currentScope.parent) instanceof BlockScope) {
            if (outerTrackerScope == currentScope) {
              // at end of block pass responsibility for inner resource to outer scope holding a wrapper
              varsOfScope.remove(trackingVar); // drop this one
              // pick a next candidate:
View Full Code Here

    VariableBinding binding,
    Reference finalAssignment) {

    // do not consider variables which are defined inside this loop
    if (binding instanceof LocalVariableBinding) {
      Scope scope = ((LocalVariableBinding) binding).declaringScope;
      while ((scope = scope.parent) != null) {
        if (scope == this.associatedScope)
          return false;
      }
    }
View Full Code Here

      messageSend.sourceStart,
      messageSend.sourceEnd);
  }
}
public void javadocHiddenReference(int sourceStart, int sourceEnd, Scope scope, int modifiers) {
  Scope currentScope = scope;
  while (currentScope.parent.kind != Scope.COMPILATION_UNIT_SCOPE ) {
    if (!javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, currentScope.getDeclarationModifiers())) {
      return;
    }
    currentScope = currentScope.parent;
  }
  String[] arguments = new String[] { this.options.getVisibilityString(this.options.reportInvalidJavadocTagsVisibility), this.options.getVisibilityString(modifiers) };
View Full Code Here

        if (outerTrackerScope == scope) {
          // outerTracker is from same scope and already processed -> pick trackingVar now
          break;
        } else {
          // outer resource is from other (outer?) scope
          Scope currentScope = scope;
          while ((currentScope = currentScope.parent) instanceof BlockScope) {
            if (outerTrackerScope == currentScope) {
              // at end of block pass responsibility for inner resource to outer scope holding a wrapper
              varsOfScope.remove(trackingVar); // drop this one
              // pick a next candidate:
View Full Code Here

      messageSend.sourceStart,
      messageSend.sourceEnd);
  }
}
public void javadocHiddenReference(int sourceStart, int sourceEnd, Scope scope, int modifiers) {
  Scope currentScope = scope;
  while (currentScope.parent.kind != Scope.COMPILATION_UNIT_SCOPE ) {
    if (!javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, currentScope.getDeclarationModifiers())) {
      return;
    }
    currentScope = currentScope.parent;
  }
  String[] arguments = new String[] { this.options.getVisibilityString(this.options.reportInvalidJavadocTagsVisibility), this.options.getVisibilityString(modifiers) };
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.jdt.core.dom.ITypeBinding#getFunctionalInterfaceMethod
   */
  @Override
  public IMethodBinding getFunctionalInterfaceMethod() {
    Scope scope = this.resolver.scope();
    if (this.binding == null || scope == null)
      return null;
    MethodBinding sam = this.binding.getSingleAbstractMethod(scope, true);
    if (sam == null || !sam.isValidBinding())
      return null;
View Full Code Here

  public boolean isAssignmentCompatible(ITypeBinding type) {
    try {
      if (this == type) return true; //$IDENTITY-COMPARISON$
      if (!(type instanceof TypeBinding)) return false;
      TypeBinding other = (TypeBinding) type;
      Scope scope = this.resolver.scope();
      if (scope == null) return false;
      return this.binding.isCompatibleWith(other.binding) || scope.isBoxingCompatibleWith(this.binding, other.binding);
    } catch (AbortCompilation e) {
      // don't surface internal exception to clients
      // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013
      return false;
    }
View Full Code Here

TOP

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

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.