congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Menu (java.awt)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 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