congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.apache.commons.digester
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.commons.digester

Best Java code snippets using org.apache.commons.digester (Showing top 20 results out of 1,089)

origin: jenkinsci/jenkins

  @Override
  public void end(String namespace, String name) throws Exception {
    digester.pop();
  }
}
origin: commons-digester/commons-digester

/**
 * <p>Register a new Rule matching the specified pattern.
 * This method sets the <code>Digester</code> property on the rule.</p>
 *
 * @param pattern Element matching pattern
 * @param rule Rule to be registered
 */
public void addRule(String pattern, Rule rule) {
  rule.setDigester(this);
  getRules().add(pattern, rule);
}
origin: commons-digester/commons-digester

/**
 * Adds an {@link SetNestedPropertiesRule}.
 *
 * @param pattern register the rule with this pattern
 * @param elementNames elment names that (in order) map to properties
 * @param propertyNames property names that (in order) elements are mapped to
 *
 * @since 1.6
 */    
public void addSetNestedProperties(String pattern, String[] elementNames, String[] propertyNames) {

  addRule(pattern, new SetNestedPropertiesRule(elementNames, propertyNames));
}
origin: jenkinsci/jenkins

@Override
public void begin(String namespace, String name, Attributes attributes) throws Exception {
  Object instance = clazz.newInstance();
  digester.push(instance);
}
origin: commons-digester/commons-digester

/**
 * Add an "object create" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param className Java class name to be created
 * @see ObjectCreateRule
 */
public void addObjectCreate(String pattern, String className) {
  addRule(pattern,
      new ObjectCreateRule(className));
}
origin: commons-digester/commons-digester

/**
 * Add a "bean property setter" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @see BeanPropertySetterRule
 */
public void addBeanPropertySetter(String pattern) {
  addRule(pattern,
      new BeanPropertySetterRule());
}
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 a "set next" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to call on the parent element
 * @see SetNextRule
 */
public void addSetNext(String pattern, String methodName) {
  addRule(pattern,
      new SetNextRule(methodName));
}
origin: commons-digester/commons-digester

/**
 * Add a "call parameter" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param paramIndex Zero-relative parameter index to set
 *  (from the body of this element)
 * @see CallParamRule
 */
public void addCallParam(String pattern, int paramIndex) {
  addRule(pattern,
      new CallParamRule(paramIndex));
}
origin: commons-digester/commons-digester

/**
 * Add a "set property" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param name Attribute name containing the property name to be set
 * @param value Attribute name containing the property value to set
 * @see SetPropertyRule
 */
public void addSetProperty(String pattern, String name, String value) {
  addRule(pattern,
      new SetPropertyRule(name, value));
}
origin: commons-digester/commons-digester

/**
 * Add {@link SetRootRule} with the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to call on the root object
 * @see SetRootRule
 */
public void addSetRoot(String pattern, String methodName) {
  addRule(pattern,
      new SetRootRule(methodName));
}
origin: commons-digester/commons-digester

/**
 * Add a "set top" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param methodName Method name to call on the parent element
 * @see SetTopRule
 */
public void addSetTop(String pattern, String methodName) {
  addRule(pattern,
      new SetTopRule(methodName));
}
origin: commons-digester/commons-digester

/** Invoked when rule is added to digester. */
@Override
public void setDigester(Digester digester) {
  super.setDigester(digester);
  log = digester.getLogger();
}

origin: commons-digester/commons-digester

/**
 * This is only invoked after all child elements have been processed,
 * so we can remove the custom Rules object that does the 
 * child-element-matching.
 */
@Override
public void body(String bodyText) throws Exception {
  AnyChildRules newRules = (AnyChildRules) digester.getRules();
  digester.setRules(newRules.getOldRules());
}
origin: commons-digester/commons-digester

/** Sets digeseter using these Rules */
public void setDigester(Digester digester) {
  wrappedRules.setDigester(digester);
  for (Rule rule : defaultRules) {
    rule.setDigester(digester);
  }
}

origin: commons-digester/commons-digester

/**
 * Set the namespace URI that will be applied to all subsequently
 * added <code>Rule</code> objects.
 *
 * @param ruleNamespaceURI Namespace URI that must match on all
 *  subsequently added rules, or <code>null</code> for matching
 *  regardless of the current namespace URI
 */
public void setRuleNamespaceURI(String ruleNamespaceURI) {
  getRules().setNamespaceURI(ruleNamespaceURI);
}
origin: commons-digester/commons-digester

/**
 * Return the <code>Rules</code> implementation object containing our
 * rules collection and associated matching policy.  If none has been
 * established, a default implementation will be created and returned.
 */
public Rules getRules() {
  if (this.rules == null) {
    this.rules = new RulesBase();
    this.rules.setDigester(this);
  }
  return (this.rules);
}
origin: commons-digester/commons-digester

/**
 * Adds an {@link SetNestedPropertiesRule}.
 *
 * @param pattern register the rule with this pattern
 *
 * @since 1.6
 */
public void addSetNestedProperties(String pattern) {

  addRule(pattern, new SetNestedPropertiesRule());
}
origin: commons-digester/commons-digester

/**
 * Add an "object create" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param clazz Java class to be created
 * @see ObjectCreateRule
 */
public void addObjectCreate(String pattern, Class<?> clazz) {
  addRule(pattern,
      new ObjectCreateRule(clazz));
}
origin: commons-digester/commons-digester

/**
 * Add a "bean property setter" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param propertyName Name of property to set
 * @see BeanPropertySetterRule
 */
public void addBeanPropertySetter(String pattern,
                 String propertyName) {
  addRule(pattern,
      new BeanPropertySetterRule(propertyName));
}
org.apache.commons.digester

Most used classes

  • Digester
    A Digester processes an XML input stream by matching a series of element nesting patterns to execut
  • Digester
    A Digester processes an XML input stream by matching a series of element nesting patterns to execut
  • DigesterLoader
    This class manages the creation of Digester instances from digester rules modules.
  • DigesterLoader
    This class manages the creation of Digester instances from digester rules modules.
  • BeanPropertySetterRule
    Rule implements sets a bean property on the top object to the body text. The property set: * ca
  • Rule,
  • SimpleRegexMatcher,
  • ExtendedBaseRules,
  • NodeCreateRule,
  • RuleSet,
  • SetPropertiesRule,
  • GenericParser,
  • MultiVariableExpander,
  • LinkedRuleBuilder,
  • ObjectCreateRule,
  • RulesBase,
  • SetNestedPropertiesRule,
  • SetNextRule,
  • SetPropertyRule
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