Package org.apache.tapestry5.plastic

Examples of org.apache.tapestry5.plastic.MethodAdvice


public class AdviseByMarkerModule2
{
    private static void doAdvise(MethodAdviceReceiver receiver, final String id)
    {
        receiver.adviseAllMethods(new MethodAdvice()
        {

            @Override
            public void advise(MethodInvocation invocation)
            {
View Full Code Here


            method.addAdvice(createImportStackAdvice(stacks));
    }

    private MethodAdvice createImportStackAdvice(final String[] stacks)
    {
        return new MethodAdvice()
        {
            public void advise(MethodInvocation invocation)
            {
                for (String stack : stacks)
                {
View Full Code Here

    }

    private void addMethodAssetOperationAdvice(PlasticMethod method, final FieldHandle access,
            final Worker<Asset> operation)
    {
        method.addAdvice(new MethodAdvice()
        {
            public void advise(MethodInvocation invocation)
            {
                Asset[] assets = (Asset[]) access.get(invocation.getInstance());
View Full Code Here

    }

    private static MethodAdvice createEventHandlerAdvice(final String eventType, final int minContextValues,
            final String methodDescription, final ComponentEventHandler handler)
    {
        return new MethodAdvice()
        {
            public void advise(MethodInvocation invocation)
            {
                // Invoke the super-class implementation first.
View Full Code Here

            return new WrapMethodHandleAsMethodAccess(handle);
        }

        public void addAdvice(final ComponentMethodAdvice advice)
        {
            MethodAdvice plasticAdvice = new WrapMethodAdviceAsComponentMethodAdvice(advice);

            plasticMethod.addAdvice(plasticAdvice);
        }
View Full Code Here

        adviseDispatchComponentEventMethod(plasticClass, invokers);
    }

    private void adviseDispatchComponentEventMethod(PlasticClass plasticClass, Flow<EventHandlerMethodInvoker> invokers)
    {
        MethodAdvice advice = createDispatchComponentEventAdvice(invokers);

        plasticClass.introduceMethod(TransformConstants.DISPATCH_COMPONENT_EVENT_DESCRIPTION).addAdvice(advice);
    }
View Full Code Here

    private MethodAdvice createDispatchComponentEventAdvice(Flow<EventHandlerMethodInvoker> invokers)
    {
        final EventHandlerMethodInvoker[] invokersArray = invokers.toArray(EventHandlerMethodInvoker.class);

        return new MethodAdvice()
        {
            public void advise(MethodInvocation invocation)
            {
                // Invoke the super-class implementation first. If no super-class,
                // this will do nothing and return false.
View Full Code Here

    public static MethodAdvice toPlasticMethodAdvice(final org.apache.tapestry5.ioc.MethodAdvice iocMethodAdvice,
            final AnnotationProvider methodAnnotationProvider)
    {
        assert iocMethodAdvice != null;

        return new MethodAdvice()
        {
            public void advise(final MethodInvocation invocation)
            {
                org.apache.tapestry5.ioc.Invocation iocInvocation = new org.apache.tapestry5.ioc.Invocation()
                {
View Full Code Here

  }

  private void addMethodGoalOperationAdvice(PlasticMethod method, final FieldHandle access,
      final Worker<com.adaptivui.tapestry5.genetify.data.Goal> operation)
  {
    method.addAdvice(new MethodAdvice()
    {
      public void advise(MethodInvocation invocation)
      {
        javascriptSupport.importStack(GenetifyConstants.GENETIFY_STACK);
       
View Full Code Here

  }

  private void addMethodGeneTypesOperationAdvice(PlasticMethod method, final FieldHandle access,
      final Worker<GeneType> operation)
  {
    method.addAdvice(new MethodAdvice()
    {
      public void advise(MethodInvocation invocation)
      {
        javascriptSupport.importStack(GenetifyConstants.GENETIFY_STACK);
       
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.plastic.MethodAdvice

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.