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

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

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

origin: apache/tapestry-5

  public void work(PlasticMethod method)
  {
    boolean valid = method.isVoid() && method.getParameters().isEmpty();
    if (!valid)
    {
      throw new RuntimeException(
          String.format(
              "Method %s is invalid: methods with the @PageReset annotation must return void, and have no parameters.",
              method.getMethodIdentifier()));
    }
  }
};
origin: apache/tapestry-5

  public void work(PlasticMethod method)
  {
    if (!method.isVoid())
      throw new RuntimeException(String.format("Method %s is a lifecycle method and should return void.", method
          .getMethodIdentifier()));
    if (!method.getParameters().isEmpty())
      throw new RuntimeException(String.format("Method %s is a lifecycle method and should take no parameters.",
          method.getMethodIdentifier()));
  }
};
origin: apache/tapestry-5

RequestParameter parameterAnnotation = method.getParameters().get(i).getAnnotation(RequestParameter.class);
origin: apache/tapestry-5

private void invokeMethod(InstructionBuilder builder, PlasticMethod method)
{
  // First, tell the Event object what method is being invoked.
  builder.loadArgument(1);
  builder.loadConstant( method.getMethodIdentifier());
  builder.invoke(Event.class, void.class, "setMethodDescription", String.class);
  builder.loadThis();
  // Methods either take no parameters, or take a MarkupWriter parameter.
  if (method.getParameters().size() > 0)
  {
    builder.loadArgument(0);
  }
  builder.invokeVirtual(method);
  // Non-void methods will pass a value to the event.
  if (!method.isVoid())
  {
    builder.boxPrimitive(method.getDescription().returnType);
    builder.loadArgument(1).swap();
    builder.invoke(Event.class, boolean.class, "storeResult", Object.class);
    builder.when(Condition.NON_ZERO, JUST_RETURN);
  }
}
org.apache.tapestry5.plasticPlasticMethodgetParameters

Javadoc

Returns access to the parameters of the method and, in particular, the visible annotations on those parameters.

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.
  • getAnnotation
  • 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.
  • isOverride
    Returns true if the method is an override of a method from the parent class.
  • isOverride

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JButton (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
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