Examples of ConstructorInvocation


Examples of lombok.ast.ConstructorInvocation

      expr.astOperator(JcTreeBuilder.BINARY_OPERATORS.inverse().get(getTag(node)));
      set(node, expr);
    }
   
    @Override public void visitNewClass(JCNewClass node) {
      ConstructorInvocation inv = new ConstructorInvocation();
      fillList(node.getArguments(), inv.rawArguments());
      fillList(node.getTypeArguments(), inv.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
      inv.rawTypeReference(toTree(node.getIdentifier(), FlagKey.TYPE_REFERENCE));
      inv.rawQualifier(toTree(node.getEnclosingExpression()));
      Node n = toTree(node.getClassBody());
      if (n instanceof TypeDeclaration) {
        NormalTypeBody body = ((ClassDeclaration) n).astBody();
        if (body != null) body.unparent();
        inv.rawAnonymousClassBody(setPos(node.getClassBody(), body));
      }
      set(node, inv);
    }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.ConstructorInvocation

      //TODO: Figure out why the dup / new causes issues.
      if(target instanceof NewInstance) {
        //get rid of this.
        context.getExpressions().pop();
      }
      methodInvocation = new ConstructorInvocation(context.getCurrentInstruction(), target, methodName, parameters);
    }
    else {
      methodInvocation = new MethodInvocation(context.getCurrentInstruction(), target, methodName, parameters);
    }
   
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ConstructorInvocation

          this.findFormalsForVariable(ctorCall);
      break;
    }

    case ASTNode.CONSTRUCTOR_INVOCATION: {
      final ConstructorInvocation ctorCall = (ConstructorInvocation) node;
      // if coming up from a argument.
      if (containedIn(ctorCall.arguments(), this.name))
        // if we don't have the source, no can do.
        if (!ctorCall.resolveConstructorBinding().getDeclaringClass()
            .isFromSource())
          throw new DefinitelyNotEnumerizableException(
              Messages.ASTNodeProcessor_SourceNotPresent, node);
        else
          // go find the formals.
          this.findFormalsForVariable(ctorCall);
      break;
    }

    case ASTNode.SUPER_CONSTRUCTOR_INVOCATION: {
      final SuperConstructorInvocation ctorCall = (SuperConstructorInvocation) node;
      // if coming up from a argument.
      if (containedIn(ctorCall.arguments(), this.name))
        // if we don't have the source, no can do.
        if (!ctorCall.resolveConstructorBinding().getDeclaringClass()
            .isFromSource())
          throw new DefinitelyNotEnumerizableException(
              Messages.ASTNodeProcessor_SourceNotPresent, node);
        else
          // go find the formals.
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

        
         Interceptor[] interceptors = (aopinfo != null) ? aopinfo.getInterceptors() : null;

         if (interceptors != null)
         {
            ConstructorInvocation inv = new ConstructorInvocation(aopinfo, aopinfo.getInterceptors());
            inv.setArguments(getArguments());
            return inv.invokeNext();
         }
        
         if (getConstructorInfo().getParameterTypes().length > 0)
         {
            Constructor<?> constructor = null;
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

         catch (InvocationTargetException e)
         {
            throw new RuntimeException(e);
         }
      }
      ConstructorInvocation invocation = new ConstructorInvocation(
              cInterceptors);

      invocation.setAdvisor(this);
      invocation.setConstructor(constructors[defaultConstructorIndex]);
      try
      {
         return invocation.invokeNext();
      }
      catch (Throwable throwable)
      {
         throw new RuntimeException(throwable);
      }
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

         methodInvocation.getMethodHash(),
         methodInvocation.getArguments());
      }
      else if (invocation instanceof ConstructorInvocation)
      {
         ConstructorInvocation cInvocation = (ConstructorInvocation) invocation;
         Object[] arguments = cInvocation.getArguments();
         Constructor constructor = cInvocation.getConstructor();
         return invokeNewWithoutAdvisement(arguments, constructor);
      }
      throw new IllegalStateException("Unknown Invocation type: " + invocation.getClass().getName());
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

   public Object invokeNew(Object[] args, int idx) throws Throwable
   {
      Interceptor[] cInterceptors = constructorInfos[idx].getInterceptors();
      if (cInterceptors == null) cInterceptors = new Interceptor[0];
      ConstructorInvocation invocation = new ConstructorInvocation(cInterceptors);

      invocation.setAdvisor(this);
      invocation.setArguments(args);
      invocation.setConstructor(constructors[idx]);
      return invocation.invokeNext();
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

   public Object invokeNew(Object[] args, int idx) throws Throwable
   {
      Interceptor[] cInterceptors = constructorInfos[idx].getInterceptors();
      if (cInterceptors == null) cInterceptors = new Interceptor[0];
      ConstructorInvocation invocation = new ConstructorInvocation(cInterceptors);

      invocation.setAdvisor(this);
      invocation.setArguments(args);
      invocation.setConstructor(constructors[idx]);
      return invocation.invokeNext();
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

         methodInvocation.getMethodHash(),
         methodInvocation.getArguments());
      }
      else if (invocation instanceof ConstructorInvocation)
      {
         ConstructorInvocation cInvocation = (ConstructorInvocation) invocation;
         Object[] arguments = cInvocation.getArguments();
         Constructor<?> constructor = cInvocation.getConstructor();
         return invokeNewWithoutAdvisement(arguments, constructor);
      }
      throw new IllegalStateException("Unknown Invocation type: " + invocation.getClass().getName());
   }
View Full Code Here

Examples of org.jboss.aop.joinpoint.ConstructorInvocation

        if (started) {
          if (invocation instanceof MethodInvocation) {
              Method method = ((MethodInvocation)invocation).getMethod();
              ProfilerController.getInstance().enterMethod(method);
          } else if (invocation instanceof ConstructorInvocation) {
              ConstructorInvocation constr = (ConstructorInvocation) invocation;
              Constructor constructor = constr.getConstructor();
          }
        }


        Object object = invocation.invokeNext();
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.