Tabnine Logo
PlasticMethod.getAnnotation
Code IndexAdd Tabnine to your IDE (free)

How to use
getAnnotation
method
in
org.apache.tapestry5.plastic.PlasticMethod

Best Java code snippets using org.apache.tapestry5.plastic.PlasticMethod.getAnnotation (Showing top 6 results out of 315)

origin: apache/tapestry-5

private void decorateMethod(PlasticClass componentClass, MutableComponentModel model, PlasticMethod method)
{
  Import annotation = method.getAnnotation(Import.class);
  decorateMethod(componentClass, model, method, annotation);
}
origin: apache/tapestry-5

EventHandlerMethod(PlasticMethod method)
{
  this.method = method;
  description = method.getDescription();
  parameterSource = buildSource();
  String methodName = method.getDescription().methodName;
  OnEvent onEvent = method.getAnnotation(OnEvent.class);
  eventType = extractEventType(methodName, onEvent);
  componentId = extractComponentId(methodName, onEvent);
  
  publishEvent = method.getAnnotation(PublishEvent.class);
}
origin: apache/tapestry-5

  @Override
  public void transform(PlasticClass plasticClass, TransformationSupport support,
      MutableComponentModel model)
  {
    for (final PlasticMethod method : plasticClass.getMethodsWithAnnotation(CommitAfter.class))
    {
      PersistenceContext annotation = method.getAnnotation(PersistenceContext.class);

      method.addAdvice(methodAdvices.get(annotation == null ? null : annotation.unitName()));
    }
  }
}
origin: org.apache.tapestry/tapestry-jpa

  @Override
  public void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model)
  {
    for (final PlasticMethod method : plasticClass
        .getMethodsWithAnnotation(CommitAfter.class))
    {
      PersistenceContext annotation = method.getAnnotation(PersistenceContext.class);

      MethodAdvice advice = annotation == null ? shared : new CommitAfterMethodAdvice(manager);

      method.addAdvice(advice);
    }
  }
}
origin: apache/tapestry-5

  public void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model)
  {
    for (PlasticMethod method : plasticClass.getMethodsWithAnnotation(Operation.class))
    {
      Operation annotation = method.getAnnotation(Operation.class);

      method.addAdvice(advisor.createAdvice(annotation.value()));
    }
  }
}
origin: apache/tapestry-5

private void adviseMethod(PlasticClass plasticClass, PlasticMethod method)
{
  // Every instance of the clas srequires its own per-thread value. This handles the case of multiple
  // pages containing the component, or the same page containing the component multiple times.
  PlasticField cacheField =
      plasticClass.introduceField(PerThreadValue.class, "cache$" + method.getDescription().methodName);
  cacheField.injectComputed(new ComputedValue<PerThreadValue>()
  {
    public PerThreadValue get(InstanceContext context)
    {
      // Each instance will get a new PerThreadValue
      return perThreadManager.createValue();
    }
  });
  Cached annotation = method.getAnnotation(Cached.class);
  MethodResultCacheFactory factory = createFactory(plasticClass, annotation.watch(), method);
  MethodAdvice advice = createAdvice(cacheField, factory);
  method.addAdvice(advice);
}
org.apache.tapestry5.plasticPlasticMethodgetAnnotation

Popular methods of PlasticMethod

  • addAdvice
    Adds advice to the method. Adding advice implicitly rewrites the implementation of the method (this
  • changeImplementation
    Clears the instructions for this method, and creates a new empty InstructionBuilder so that the impl
  • delegateTo
    Much like #delegateTo(PlasticField), but the object to delegate to is dynamically computed by anothe
  • getDescription
    Returns a representation of the method's name, return value, argument types, etc.
  • getPlasticClass
    Returns the PlasticClass containing this method.
  • hasAnnotation
  • getMethodIdentifier
    Returns a short identifier for the method that includes the class name, the method name, and the typ
  • isVoid
    Returns true if this method is type void.
  • getHandle
    Returns a handle that can be used to invoke a method of a transformed class instance.
  • getParameters
    Returns access to the parameters of the method and, in particular, the visible annotations on those
  • isOverride
    Returns true if the method is an override of a method from the parent class.
  • isOverride

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now