Tabnine Logo
CallMethodRule.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.commons.digester.CallMethodRule
constructor

Best Java code snippets using org.apache.commons.digester.CallMethodRule.<init> (Showing top 12 results out of 315)

origin: commons-digester/commons-digester

/**
 * {@inheritDoc}
 */
public CallMethodRule get() {
  return new CallMethodRule(this.methodName,
      this.parameterTypes.length,
      this.parameterTypes);
}
origin: commons-digester/commons-digester

/**
 * Add an "call method" rule for a method which accepts no arguments.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName) {
  addRule(
      pattern,
      new CallMethodRule(methodName));
}
origin: commons-digester/commons-digester

/**
 * Add an "call method" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @param paramCount Number of expected parameters (or zero
 *  for a single parameter from the body of this element)
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName,
             int paramCount) {
  addRule(pattern,
      new CallMethodRule(methodName, paramCount));
}
origin: commons-digester/commons-digester

@Override
public Object createObject(Attributes attributes) {
  Rule callMethodRule = null;
  String methodName = attributes.getValue("methodname");
  // Select which element is to be the target. Default to zero,
  // ie the top object on the stack.
  int targetOffset = 0;
  String targetOffsetStr = attributes.getValue("targetoffset");
  if (targetOffsetStr != null) {
    targetOffset = Integer.parseInt(targetOffsetStr);
  }
  if (attributes.getValue("paramcount") == null) {
    // call against empty method
    callMethodRule = new CallMethodRule(targetOffset, methodName);
  
  } else {
    int paramCount = Integer.parseInt(attributes.getValue("paramcount"));
    
    String paramTypesAttr = attributes.getValue("paramtypes");
    if (paramTypesAttr == null || paramTypesAttr.length() == 0) {
      callMethodRule = new CallMethodRule(targetOffset, methodName, paramCount);
    } else {
      String[] paramTypes = getParamTypes(paramTypesAttr);
      callMethodRule = new CallMethodRule(
        targetOffset, methodName, paramCount, paramTypes);
    }
  }
  return callMethodRule;
}
origin: commons-digester/commons-digester

/**
 * Add an "call method" rule for the specified parameters.
 * If <code>paramCount</code> is set to zero the rule will use
 * the body of the matched element as the single argument of the
 * method, unless <code>paramTypes</code> is null or empty, in this
 * case the rule will call the specified method with no arguments.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @param paramCount Number of expected parameters (or zero
 *  for a single parameter from the body of this element)
 * @param paramTypes The Java class names of the arguments
 *  (if you wish to use a primitive type, specify the corresonding
 *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
 *  for a <code>boolean</code> parameter)
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName,
             int paramCount, Class<?> paramTypes[]) {
  addRule(pattern,
      new CallMethodRule(
                methodName,
                paramCount, 
                paramTypes));
}
origin: commons-digester/commons-digester

/**
 * Add an "call method" rule for the specified parameters.
 * If <code>paramCount</code> is set to zero the rule will use
 * the body of the matched element as the single argument of the
 * method, unless <code>paramTypes</code> is null or empty, in this
 * case the rule will call the specified method with no arguments.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @param paramCount Number of expected parameters (or zero
 *  for a single parameter from the body of this element)
 * @param paramTypes Set of Java class names for the types
 *  of the expected parameters
 *  (if you wish to use a primitive type, specify the corresonding
 *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
 *  for a <code>boolean</code> parameter)
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName,
             int paramCount, String paramTypes[]) {
  addRule(pattern,
      new CallMethodRule(
                methodName,
                paramCount, 
                paramTypes));
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Add an "call method" rule for a method which accepts no arguments.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName) {
  addRule(
      pattern,
      new CallMethodRule(methodName));
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Add an "call method" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @param paramCount Number of expected parameters (or zero
 *  for a single parameter from the body of this element)
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName,
             int paramCount) {
  addRule(pattern,
      new CallMethodRule(methodName, paramCount));
}
origin: com.alibaba.citrus.tool/antx-autoexpand

public Object createObject(Attributes attributes) {
  Rule callMethodRule = null;
  String methodName = attributes.getValue("methodname");
  // Select which element is to be the target. Default to zero,
  // ie the top object on the stack.
  int targetOffset = 0;
  String targetOffsetStr = attributes.getValue("targetoffset");
  if (targetOffsetStr != null) {
    targetOffset = Integer.parseInt(targetOffsetStr);
  }
  if (attributes.getValue("paramcount") == null) {
    // call against empty method
    callMethodRule = new CallMethodRule(targetOffset, methodName);
  
  } else {
    int paramCount = Integer.parseInt(attributes.getValue("paramcount"));
    
    String paramTypesAttr = attributes.getValue("paramtypes");
    if (paramTypesAttr == null || paramTypesAttr.length() == 0) {
      callMethodRule = new CallMethodRule(targetOffset, methodName, paramCount);
    } else {
      String[] paramTypes = getParamTypes(paramTypesAttr);
      callMethodRule = new CallMethodRule(
        targetOffset, methodName, paramCount, paramTypes);
    }
  }
  return callMethodRule;
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Add an "call method" rule for the specified parameters.
 * If <code>paramCount</code> is set to zero the rule will use
 * the body of the matched element as the single argument of the
 * method, unless <code>paramTypes</code> is null or empty, in this
 * case the rule will call the specified method with no arguments.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @param paramCount Number of expected parameters (or zero
 *  for a single parameter from the body of this element)
 * @param paramTypes Set of Java class names for the types
 *  of the expected parameters
 *  (if you wish to use a primitive type, specify the corresonding
 *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
 *  for a <code>boolean</code> parameter)
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName,
             int paramCount, String paramTypes[]) {
  addRule(pattern,
      new CallMethodRule(
                methodName,
                paramCount, 
                paramTypes));
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Add an "call method" rule for the specified parameters.
 * If <code>paramCount</code> is set to zero the rule will use
 * the body of the matched element as the single argument of the
 * method, unless <code>paramTypes</code> is null or empty, in this
 * case the rule will call the specified method with no arguments.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to be called
 * @param paramCount Number of expected parameters (or zero
 *  for a single parameter from the body of this element)
 * @param paramTypes The Java class names of the arguments
 *  (if you wish to use a primitive type, specify the corresonding
 *  Java wrapper class instead, such as <code>java.lang.Boolean</code>
 *  for a <code>boolean</code> parameter)
 * @see CallMethodRule
 */
public void addCallMethod(String pattern, String methodName,
             int paramCount, Class<?> paramTypes[]) {
  addRule(pattern,
      new CallMethodRule(
                methodName,
                paramCount, 
                paramTypes));
}
origin: org.opencms/opencms-core

digester.addRule(prefPath, new CallMethodRule(1, "addPreference", 9));
digester.addCallParam(prefPath, 0, A_NAME);
digester.addCallParam(prefPath, 1, A_VALUE);
org.apache.commons.digesterCallMethodRule<init>

Javadoc

Construct a "call method" rule with the specified method name. The method should accept no parameters.

Popular methods of CallMethodRule

  • begin
    Process the start of this element.
  • end
    Process the end of this element.
  • processMethodCallResult
    Subclasses may override this method to perform additional processing of the invoked method's result.

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JOptionPane (javax.swing)
  • CodeWhisperer alternatives
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