Examples of ClassScope


Examples of com.google.dart.engine.internal.scope.ClassScope

            new Exception());
        super.visitClassDeclaration(node);
      } else {
        nameScope = new TypeParameterScope(nameScope, classElement);
        visitClassDeclarationInScope(node);
        nameScope = new ClassScope(nameScope, classElement);
        visitClassMembersInScope(node);
      }
    } finally {
      nameScope = outerScope;
    }
View Full Code Here

Examples of com.google.dart.engine.internal.scope.ClassScope

  @Override
  public Void visitClassTypeAlias(ClassTypeAlias node) {
    Scope outerScope = nameScope;
    try {
      ClassElement element = node.getElement();
      nameScope = new ClassScope(new TypeParameterScope(nameScope, element), element);
      super.visitClassTypeAlias(node);
    } finally {
      nameScope = outerScope;
    }
    return null;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope

    if (realBinding instanceof MethodBinding) {
      MethodBinding mb = (MethodBinding) realBinding;
      if (mb != null) {
        SourceTypeBinding stb = (SourceTypeBinding) mb.declaringClass;
        if (stb != null) {
          ClassScope cScope = stb.scope;
          if (cScope != null) {
            return cScope.referenceContext;
          }
        }
      }
    } else if (realBinding instanceof FieldBinding) {
      FieldBinding fb = (FieldBinding) realBinding;
      if (fb != null) {
        SourceTypeBinding stb = (SourceTypeBinding) fb.declaringClass;
        if (stb != null) {
          ClassScope cScope = stb.scope;
          if (cScope != null) {
            return cScope.referenceContext;
          }
        }
      }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope

   */
  public void ensureScopeSetup() {
    if (scopeSetup) {
      return; // don't do it again
    }
    ClassScope scope = this.scope;

    // TODO [inner] ton of stuff related to parameterization support

    // if (ot instanceof ParameterizedQualifiedTypeReference) { // pr132349
    // ParameterizedQualifiedTypeReference pref = (ParameterizedQualifiedTypeReference) ot;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope

  // override
  public void resolveStatements() {
    if (binding == null || ignoreFurtherInvestigation)
      return;

    ClassScope upperScope = (ClassScope) scope.parent; // !!! safety

    modifiers = checkAndSetModifiers(modifiers, upperScope);
    int bindingModifiers = (modifiers | (binding.modifiers & ExtraCompilerModifiers.AccGenericSignature));
    binding.modifiers = bindingModifiers;

    if (kind == AdviceKind.AfterThrowing && extraArgument != null) {
      TypeBinding argTb = extraArgument.binding.type;
      TypeBinding expectedTb = upperScope.getJavaLangThrowable();
      if (!argTb.isCompatibleWith(expectedTb)) {
        scope.problemReporter().typeMismatchError(argTb, expectedTb, extraArgument);
        ignoreFurtherInvestigation = true;
        return;
      }
    }

    pointcutDesignator.finishResolveTypes(this, this.binding, baseArgumentCount, upperScope.referenceContext.binding);

    if (binding == null || ignoreFurtherInvestigation)
      return;

    if (kind == AdviceKind.Around) {
      ReferenceBinding[] exceptions = new ReferenceBinding[] { upperScope.getJavaLangThrowable() };
      proceedMethodBinding = new MethodBinding(Modifier.STATIC | Flags.AccSynthetic, "proceed".toCharArray(),
          binding.returnType, resize(baseArgumentCount + 1, binding.parameters), exceptions, binding.declaringClass);
      proceedMethodBinding.selector = CharOperation.concat(selector, proceedMethodBinding.selector);
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope

  // override
  public void resolveStatements() {
    if (binding == null || ignoreFurtherInvestigation) return;
   
    ClassScope upperScope = (ClassScope)scope.parent;  //!!! safety
   
    modifiers = checkAndSetModifiers(modifiers, upperScope);
    int bindingModifiers = (modifiers | (binding.modifiers & AccGenericSignature));
    binding.modifiers = bindingModifiers;
   
    if (kind == AdviceKind.AfterThrowing && extraArgument != null) {
      TypeBinding argTb = extraArgument.binding.type;
      TypeBinding expectedTb = upperScope.getJavaLangThrowable();
      if (!argTb.isCompatibleWith(expectedTb)) {
        scope.problemReporter().typeMismatchError(argTb, expectedTb, extraArgument);
        ignoreFurtherInvestigation = true;
        return;
      }
    }
   
   
    pointcutDesignator.finishResolveTypes(this, this.binding,
      baseArgumentCount, upperScope.referenceContext.binding);
   
    if (binding == null || ignoreFurtherInvestigation) return;
   
    if (kind == AdviceKind.Around) {
      ReferenceBinding[] exceptions =
        new ReferenceBinding[] { upperScope.getJavaLangThrowable() };
      proceedMethodBinding = new MethodBinding(Modifier.STATIC,
        "proceed".toCharArray(), binding.returnType,
        resize(baseArgumentCount+1, binding.parameters),
        exceptions, binding.declaringClass);
      proceedMethodBinding.selector =
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope

    fileScope.startLine("package " + packageName + ";\n");
    fileScope.append("\n");
    fileScope.startLine("public class " + className + " implements " +
        rootImpl.getType().getCanonicalName() + " {\n");

    ClassScope rootClassScope = fileScope.newClassScope();
    rootClassScope.indentRight();

    rootImpl.writeStaticMethodJava(rootClassScope);

    for (TypeHandler<?> typeHandler : type2TypeHandler.values()) {
      typeHandler.writeStaticClassJava(rootClassScope);
    }

    rootClassScope.writeClassMembers();

    rootClassScope.indentLeft();

    rootClassScope.startLine("}\n");

    Map<Class<?>, String> type2ImplClassName = new HashMap<Class<?>, String>();
    for (TypeHandler<?> typeHandler : type2TypeHandler.values()) {
      String shortName = fileScope.getTypeImplShortName(typeHandler);
      String fullReference = packageName + "." + className + "." + shortName;
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope

    } else {
      fileScope.append("ObjectValueBase");
    }
    fileScope.append(" implements " + typeClassName + " {\n");

    ClassScope classScope = fileScope.newClassScope();
    classScope.indentRight();

    classScope.startLine("public static " + valueImplClassName + " parse(Object input)" +
        Util.THROWS_CLAUSE + " {\n");
    classScope.indentRight();
    subtypeAspect.writeParseMethodJava(classScope, valueImplClassName, "input");
    classScope.indentLeft();
    classScope.startLine("}");
    classScope.append("\n");
    classScope.startLine(valueImplClassName + "(Object input");
    subtypeAspect.writeSuperConstructorParamJava(classScope);
    classScope.append(")" + Util.THROWS_CLAUSE + " {\n");

    {
      MethodScope methodScope = classScope.newMethodScope();
      methodScope.indentRight();
      methodScope.startLine("super(input);\n");

      subtypeAspect.writeSuperConstructorInitializationJava(methodScope);

      for (FieldLoader fieldLoader : fieldLoaders) {
        String valueRef = methodScope.newMethodScopedName("value");
        String hasValueRef = methodScope.newMethodScopedName("hasValue");
        String fieldName = fieldLoader.getFieldName();
        methodScope.append("\n");
        Util.writeReadValueAndHasValue(methodScope, fieldName, "underlying", valueRef,
            hasValueRef);
        fieldLoader.writeFieldLoadJava(methodScope, valueRef, hasValueRef);
      }

      if (algCasesData != null) {
        algCasesData.writeConstructorCodeJava(methodScope);
      }

      methodScope.indentLeft();

    }

    classScope.startLine("}\n");

    for (VolatileFieldBinding field : volatileFields) {
      field.writeFieldDeclarationJava(classScope);
    }

    for (FieldLoader loader : this.fieldLoaders) {
      loader.writeFieldDeclarationJava(classScope);
    }

    if (algCasesData != null) {
      algCasesData.writeFiledsJava(classScope);
    }

    subtypeAspect.writeSuperFieldJava(classScope);

    for (Map.Entry<Method, MethodHandler> en : this.methodHandlerMap.entrySet()) {
      Method m = en.getKey();
      MethodHandler methodHandler = en.getValue();
      methodHandler.writeMethodImplementationJava(classScope, m);
    }

    BaseHandlersLibrary.writeBaseMethodsJava(classScope, this);

    subtypeAspect.writeHelperMethodsJava(classScope);

    classScope.indentLeft();
    classScope.startLine("}\n");
    fileScope.append("\n");
  }
View Full Code Here

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

          // handle the error case inside an explicit constructor call (see MethodScope>>findField)
          MethodScope methodScope = (MethodScope) currentScope;
          staticsOnly |= methodScope.isStatic | methodScope.isConstructorCall;
          break;
        case Scope.CLASS_SCOPE :
          ClassScope classScope = (ClassScope) currentScope;
          SourceTypeBinding enclosingType = classScope.referenceContext.binding;

          searchVisibleFields(
              enclosingType,
              classScope,
View Full Code Here

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

        compilationResult, 1);
    LookupEnvironment lookupEnvironment = createMockLookupEnvironment();
    cud.scope = new CompilationUnitScope(cud, lookupEnvironment);

    TypeDeclaration typeDeclaration = new TypeDeclaration(compilationResult);
    typeDeclaration.scope = new ClassScope(cud.scope, null);
    typeDeclaration.staticInitializerScope = new MethodScope(
        typeDeclaration.scope, null, false);
    cud.types = new TypeDeclaration[] {typeDeclaration};

    BinaryTypeBinding binaryTypeBinding = new BinaryTypeBinding(null,
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.