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

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


  }

  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


      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

    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

  protected abstract void onTypeRef(SourceTypeBinding referencedType,
      CompilationUnitDeclaration unitOfReferrer);

  private CompilationUnitScope findUnitScope(Scope referencedFrom) {
    assert (referencedFrom != null);
    Scope scope = referencedFrom;
    while (scope.parent != null) {
      scope = scope.parent;
    }
    assert (scope instanceof CompilationUnitScope);
    return (CompilationUnitScope) scope;
View Full Code Here

  public static final String REBIND_MAGIC_METHOD = "create";

  public static void reportRebindProblem(DeferredBindingSite site,
      String message) {
    MessageSend messageSend = site.messageSend;
    Scope scope = site.scope;
    // Safe since CUS.referenceContext is set in its constructor.
    CompilationUnitDeclaration cud = scope.compilationUnitScope().referenceContext;
    GWTProblem.recordInCud(messageSend, cud, message, null);
  }
View Full Code Here

  public static final String REBIND_MAGIC_METHOD = "create";
  public static final String ASYNC_MAGIC_METHOD = "runAsync";

  public static void reportRebindProblem(MessageSendSite site, String message) {
    MessageSend messageSend = site.messageSend;
    Scope scope = site.scope;
    // Safe since CUS.referenceContext is set in its constructor.
    CompilationUnitDeclaration cud = scope.compilationUnitScope().referenceContext;
    GWTProblem.recordError(messageSend, cud, message, null);
  }
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

  protected abstract void onTypeRef(SourceTypeBinding referencedType,
      CompilationUnitDeclaration unitOfReferrer);

  private CompilationUnitScope findUnitScope(Scope referencedFrom) {
    assert (referencedFrom != null);
    Scope scope = referencedFrom;
    while (scope.parent != null) {
      scope = scope.parent;
    }
    assert (scope instanceof CompilationUnitScope);
    return (CompilationUnitScope) scope;
View Full Code Here

  public static final String REBIND_MAGIC_METHOD = "create";

  public static void reportRebindProblem(DeferredBindingSite site,
      String message) {
    MessageSend messageSend = site.messageSend;
    Scope scope = site.scope;
    CompilationResult compResult = scope.compilationUnitScope().referenceContext().compilationResult();
    int startLine = ProblemHandler.searchLineNumber(
        compResult.lineSeparatorPositions, messageSend.sourceStart());
    DefaultProblem problem = new DefaultProblem(compResult.fileName, message,
        IProblem.Unclassified, null, ProblemSeverities.Error,
        messageSend.sourceStart, messageSend.sourceEnd, startLine);
    compResult.record(problem, scope.referenceContext());
  }
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

TOP

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

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.