コード例 #1
0
ファイル: SuperReference.java プロジェクト: vjetteam/vjet
  public TypeBinding resolveType(BlockScope scope) {

    constant = Constant.NotAConstant;
    if (!checkAccess(scope.methodScope())) return null;
    ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
    if (enclosingReceiverType.id == T_JavaLangObject) {
      scope.problemReporter().cannotUseSuperInJavaLangObject(this);
      return null;
    }
    return this.resolvedType = enclosingReceiverType.superclass();
  }
コード例 #2
0
  public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {

    TypeBinding memberType = scope.getMemberType(token, enclosingType);
    if (!memberType.isValidBinding()) {
      this.resolvedType = memberType;
      scope.problemReporter().invalidEnclosingType(this, memberType, enclosingType);
      return null;
    }
    if (isTypeUseDeprecated(memberType, scope))
      scope.problemReporter().deprecatedType(memberType, this);
    return this.resolvedType = memberType;
  }