Examples of NestedTypeBinding


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

          && !(binding instanceof BinaryTypeBinding)) {
        // TODO(tobyr) Do something here for binary types?

        // add synthetic fields for outer this and locals
        assert (type instanceof JClassType);
        NestedTypeBinding nestedBinding = (NestedTypeBinding) binding;
        if (nestedBinding.enclosingInstances != null) {
          for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
            SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
            createField(arg, type, Disposition.THIS_REF);
          }
View Full Code Here

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

    if (declaringClass.isNestedType() && !declaringClass.isStatic()) {
      // TODO(tobyr) Do we have to do the equivalent for binary types here
      // or will this just fall out correctly?

      // add synthetic args for outer this
      NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
      if (nestedBinding.enclosingInstances != null) {
        for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
          SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
          String argName = String.valueOf(arg.name);
          if (alreadyNamedVariables.contains(argName)) {
            argName += "_" + i;
          }
          createParameter(arg, argName, newCtor);
          alreadyNamedVariables.add(argName);
        }
      }
    }

    // user args
    if (decl == null) {
      mapParameters(newCtor, b, info);
    } else {
      mapParameters(newCtor, decl, info);
    }
    // original params are now frozen

    addThrownExceptions(b, newCtor);

    info.addCorrelation(info.getCorrelator().by(newCtor));

    if (declaringClass.isNestedType() && !declaringClass.isStatic()) {
      // add synthetic args for locals
      NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
      // add synthetic args for outer this and locals
      if (nestedBinding.outerLocalVariables != null) {
        for (int i = 0; i < nestedBinding.outerLocalVariables.length; ++i) {
          SyntheticArgumentBinding arg = nestedBinding.outerLocalVariables[i];
          String argName = String.valueOf(arg.name);
View Full Code Here

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

         * us.
         */
        if (!hasExplicitThis) {
          ReferenceBinding declaringClass = (ReferenceBinding) x.binding.declaringClass.erasure();
          if (declaringClass instanceof NestedTypeBinding) {
            NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
            if (nestedBinding.enclosingInstances != null) {
              for (SyntheticArgumentBinding arg : nestedBinding.enclosingInstances) {
                JBinaryOperation asg = assignSyntheticField(info, arg);
                block.addStmt(asg.makeStatement());
              }
View Full Code Here

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

        }

        // Map synthetic arguments for outer this.
        ReferenceBinding declaringClass = (ReferenceBinding) x.binding.declaringClass.erasure();
        if (declaringClass.isNestedType() && !declaringClass.isStatic()) {
          NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
          if (nestedBinding.enclosingInstances != null) {
            for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
              SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
              curMethod.locals.put(arg, it.next());
            }
          }
        }

        // Map user arguments.
        if (x.arguments != null) {
          for (Argument argument : x.arguments) {
            curMethod.locals.put(argument.binding, it.next());
          }
        }

        // Map synthetic arguments for locals.
        if (declaringClass.isNestedType() && !declaringClass.isStatic()) {
          // add synthetic args for locals
          NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
          // add synthetic args for outer this and locals
          if (nestedBinding.outerLocalVariables != null) {
            for (int i = 0; i < nestedBinding.outerLocalVariables.length; ++i) {
              SyntheticArgumentBinding arg = nestedBinding.outerLocalVariables[i];
              curMethod.locals.put(arg, it.next());
View Full Code Here

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

      int index = 0;
      SourceTypeBinding binding = x.binding;
      if (binding.isNestedType() && !binding.isStatic()) {
        // add synthetic fields for outer this and locals
        assert (type instanceof JClassType);
        NestedTypeBinding nestedBinding = (NestedTypeBinding) binding;
        if (nestedBinding.enclosingInstances != null) {
          for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
            SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
            createSyntheticField(arg, type, index++, Disposition.THIS_REF);
          }
View Full Code Here

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

            .get(x.enumConstant.binding.original().id));
      }

      // Synthetic args for inner classes
      ReferenceBinding targetBinding = (ReferenceBinding) b.declaringClass.erasure();
      NestedTypeBinding nestedBinding = null;
      if (targetBinding.isNestedType() && !targetBinding.isStatic()) {
        nestedBinding = (NestedTypeBinding) targetBinding;
      }
      if (nestedBinding != null) {
        // Synthetic this args for inner classes
View Full Code Here

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

        method.addParam(new JParameter(info, "enum$ordinal", JPrimitiveType.INT, true, false,
            method));
      }
      // add synthetic args for outer this
      if (isNested) {
        NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
        if (nestedBinding.enclosingInstances != null) {
          for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
            SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
            String argName = String.valueOf(arg.name);
            if (alreadyNamedVariables.contains(argName)) {
              argName += "_" + i;
            }
            createParameter(info, arg, argName, method);
            alreadyNamedVariables.add(argName);
          }
        }
      }
    } else {
      method =
          new JMethod(info, intern(b.selector), enclosingType, typeMap.get(b.returnType), b
              .isAbstract(), b.isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b));
    }

    // User args.
    createParameters(method, x);

    if (x.isConstructor()) {
      if (isNested) {
        // add synthetic args for locals
        NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
        // add synthetic args for outer this and locals
        if (nestedBinding.outerLocalVariables != null) {
          for (int i = 0; i < nestedBinding.outerLocalVariables.length; ++i) {
            SyntheticArgumentBinding arg = nestedBinding.outerLocalVariables[i];
            String argName = String.valueOf(arg.name);
View Full Code Here

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

         * us.
         */
        if (!hasExplicitThis) {
          ReferenceBinding declaringClass = (ReferenceBinding) x.binding.declaringClass.erasure();
          if (JdtUtil.isInnerClass(declaringClass)) {
            NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
            if (nestedBinding.enclosingInstances != null) {
              for (SyntheticArgumentBinding arg : nestedBinding.enclosingInstances) {
                JBinaryOperation asg = assignSyntheticField(info, arg);
                block.addStmt(asg.makeStatement());
              }
View Full Code Here

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

        // Map synthetic arguments for outer this.
        ReferenceBinding declaringClass = (ReferenceBinding) x.binding.declaringClass.erasure();
        boolean isNested = JdtUtil.isInnerClass(declaringClass);
        if (isNested) {
          NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
          if (nestedBinding.enclosingInstances != null) {
            for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
              SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
              curMethod.locals.put(arg, it.next());
            }
          }
        }

        // Map user arguments.
        if (x.arguments != null) {
          for (Argument argument : x.arguments) {
            curMethod.locals.put(argument.binding, it.next());
          }
        }

        // Map synthetic arguments for locals.
        if (isNested) {
          // add synthetic args for locals
          NestedTypeBinding nestedBinding = (NestedTypeBinding) declaringClass;
          // add synthetic args for outer this and locals
          if (nestedBinding.outerLocalVariables != null) {
            for (int i = 0; i < nestedBinding.outerLocalVariables.length; ++i) {
              SyntheticArgumentBinding arg = nestedBinding.outerLocalVariables[i];
              curMethod.locals.put(arg, it.next());
View Full Code Here

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

       */
      SourceTypeBinding binding = x.binding;
      if (JdtUtil.isInnerClass(binding)) {
        // add synthetic fields for outer this and locals
        assert (type instanceof JClassType);
        NestedTypeBinding nestedBinding = (NestedTypeBinding) binding;
        if (nestedBinding.enclosingInstances != null) {
          for (int i = 0; i < nestedBinding.enclosingInstances.length; ++i) {
            SyntheticArgumentBinding arg = nestedBinding.enclosingInstances[i];
            createSyntheticField(arg, type, Disposition.THIS_REF);
          }
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.