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

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

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

origin: commons-digester/commons-digester

/**
 * {@inheritDoc}
 */
public ObjectCreateRule get() {
  return new ObjectCreateRule(this.clazz);
}
origin: commons-digester/commons-digester

  @Override
  public Object createObject(Attributes attributes) {
    String className = attributes.getValue("classname");
    String attrName = attributes.getValue("attrname");
    return (attrName == null || attrName.length() == 0) ?
      new ObjectCreateRule( className) :
      new ObjectCreateRule( className, attrName);
  }
}
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 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 an "object create" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param className Default Java class name to be created
 * @param attributeName Attribute name that optionally overrides
 *  the default Java class name to be created
 * @see ObjectCreateRule
 */
public void addObjectCreate(String pattern, String className,
              String attributeName) {
  addRule(pattern,
      new ObjectCreateRule(className, attributeName));
}
origin: commons-digester/commons-digester

/**
 * Add an "object create" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param attributeName Attribute name that optionally overrides
 * @param clazz Default Java class to be created
 *  the default Java class name to be created
 * @see ObjectCreateRule
 */
public void addObjectCreate(String pattern,
              String attributeName,
              Class<?> clazz) {
  addRule(pattern,
      new ObjectCreateRule(attributeName, clazz));
}
origin: com.alibaba.citrus.tool/antx-autoexpand

  public Object createObject(Attributes attributes) {
    String className = attributes.getValue("classname");
    String attrName = attributes.getValue("attrname");
    return (attrName == null || attrName.length() == 0) ?
      new ObjectCreateRule( className) :
      new ObjectCreateRule( className, attrName);
  }
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * 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: com.alibaba.citrus.tool/antx-autoexpand

/**
 * 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: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Add an "object create" rule for the specified parameters.
 *
 * @param pattern Element matching pattern
 * @param className Default Java class name to be created
 * @param attributeName Attribute name that optionally overrides
 *  the default Java class name to be created
 * @see ObjectCreateRule
 */
public void addObjectCreate(String pattern, String className,
              String attributeName) {
  addRule(pattern,
      new ObjectCreateRule(className, attributeName));
}
origin: com.alibaba.citrus.tool/antx-autoexpand

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

/**
 * Add Digester rules for all &lt;onentry&gt; and &lt;onexit&gt;
 * elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param pr The {@link PathResolver} for this document
 * @param customActions The list of custom actions this digester needs
 *                      to be able to process
 */
private static void addHandlerRules(final String xp,
    final ExtendedBaseRules scxmlRules, final PathResolver pr,
    final List customActions) {
  scxmlRules.add(xp + XPF_ONEN, new ObjectCreateRule(OnEntry.class));
  addActionRules(xp + XPF_ONEN, scxmlRules, pr, customActions);
  scxmlRules.add(xp + XPF_ONEN, new SetNextRule("setOnEntry"));
  scxmlRules.add(xp + XPF_ONEX, new ObjectCreateRule(OnExit.class));
  addActionRules(xp + XPF_ONEX, scxmlRules, pr, customActions);
  scxmlRules.add(xp + XPF_ONEX, new SetNextRule("setOnExit"));
}
origin: commons-scxml/commons-scxml

/**
 * Add Digester rules for all &lt;onentry&gt; and &lt;onexit&gt;
 * elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param pr The {@link PathResolver} for this document
 * @param customActions The list of custom actions this digester needs
 *                      to be able to process
 */
private static void addHandlerRules(final String xp,
    final ExtendedBaseRules scxmlRules, final PathResolver pr,
    final List customActions) {
  scxmlRules.add(xp + XPF_ONEN, new ObjectCreateRule(OnEntry.class));
  addActionRules(xp + XPF_ONEN, scxmlRules, pr, customActions);
  scxmlRules.add(xp + XPF_ONEN, new SetNextRule("setOnEntry"));
  scxmlRules.add(xp + XPF_ONEX, new ObjectCreateRule(OnExit.class));
  addActionRules(xp + XPF_ONEX, scxmlRules, pr, customActions);
  scxmlRules.add(xp + XPF_ONEX, new SetNextRule("setOnExit"));
}
origin: commons-scxml/commons-scxml

/**
 * Add Digester rules for all &lt;datamodel&gt; elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param pr The PathResolver
 * @param scxml The parent SCXML document (or null)
 */
private static void addDatamodelRules(final String xp,
    final ExtendedBaseRules scxmlRules, final SCXML scxml,
    final PathResolver pr) {
  scxmlRules.add(xp, new ObjectCreateRule(Datamodel.class));
  scxmlRules.add(xp + XPF_DATA, new ObjectCreateRule(Data.class));
  scxmlRules.add(xp + XPF_DATA, new SetPropertiesRule());
  scxmlRules.add(xp + XPF_DATA, new SetCurrentNamespacesRule());
  scxmlRules.add(xp + XPF_DATA, new SetNextRule("addData"));
  try {
    scxmlRules.add(xp + XPF_DATA, new ParseDataRule(pr));
  } catch (ParserConfigurationException pce) {
    org.apache.commons.logging.Log log = LogFactory.
      getLog(SCXMLDigester.class);
    log.error(ERR_PARSER_CFG_DATA, pce);
  }
  scxmlRules.add(xp, new SetNextRule("setDatamodel"));
}
origin: commons-scxml/commons-scxml

/**
 * Add Digester rules for all &lt;initial&gt; elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param customActions The list of custom actions this digester needs
 *                      to be able to process
 * @param pr The PathResolver
 * @param scxml The parent SCXML document (or null)
 */
private static void addInitialRules(final String xp,
    final ExtendedBaseRules scxmlRules, final List customActions,
    final PathResolver pr, final SCXML scxml) {
  scxmlRules.add(xp, new ObjectCreateRule(Initial.class));
  addPseudoStatePropertiesRules(xp, scxmlRules, customActions, pr,
    scxml);
  scxmlRules.add(xp, new UpdateModelRule(scxml));
  addTransitionRules(xp + XPF_TR, scxmlRules, "setTransition",
    pr, customActions);
  scxmlRules.add(xp, new SetNextRule("setInitial"));
}
origin: commons-scxml/commons-scxml

/**
 * Add the run of the mill Digester rules for any element.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param klass The class in the Java object model to be instantiated
 *              in the ObjectCreateRule for this action
 * @param args The attributes to be mapped into the object model
 * @param props The properties that args get mapped to
 * @param addMethod The method that the SetNextRule should call
 */
private static void addSimpleRulesTuple(final String xp,
    final ExtendedBaseRules scxmlRules, final Class klass,
    final String[] args, final String[] props,
    final String addMethod) {
  scxmlRules.add(xp, new ObjectCreateRule(klass));
  if (args == null) {
    scxmlRules.add(xp, new SetPropertiesRule());
  } else {
    scxmlRules.add(xp, new SetPropertiesRule(args, props));
  }
  scxmlRules.add(xp, new SetNextRule(addMethod));
}
origin: commons-scxml/commons-scxml

/**
 * Add the run of the mill Digester rules for any element.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param klass The class in the Java object model to be instantiated
 *              in the ObjectCreateRule for this action
 * @param args The attributes to be mapped into the object model
 * @param props The properties that args get mapped to
 * @param addMethod The method that the SetNextRule should call
 */
private static void addSimpleRulesTuple(final String xp,
    final ExtendedBaseRules scxmlRules, final Class klass,
    final String[] args, final String[] props,
    final String addMethod) {
  scxmlRules.add(xp, new ObjectCreateRule(klass));
  if (args == null) {
    scxmlRules.add(xp, new SetPropertiesRule());
  } else {
    scxmlRules.add(xp, new SetPropertiesRule(args, props));
  }
  scxmlRules.add(xp, new SetNextRule(addMethod));
}
origin: commons-scxml/commons-scxml

/**
 * Add Digester rules for all &lt;initial&gt; elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param customActions The list of custom actions this digester needs
 *                      to be able to process
 * @param pr The PathResolver
 * @param scxml The parent SCXML document (or null)
 */
private static void addInitialRules(final String xp,
    final ExtendedBaseRules scxmlRules, final List customActions,
    final PathResolver pr, final SCXML scxml) {
  scxmlRules.add(xp, new ObjectCreateRule(Initial.class));
  addPseudoStatePropertiesRules(xp, scxmlRules, customActions, pr,
    scxml);
  scxmlRules.add(xp, new UpdateModelRule(scxml));
  addTransitionRules(xp + XPF_TR, scxmlRules, "setTransition",
    pr, customActions);
  scxmlRules.add(xp, new SetNextRule("setInitial"));
}
origin: commons-scxml/commons-scxml

/**
 * Add Digester rules for all &lt;history&gt; elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param customActions The list of custom actions this digester needs
 *                      to be able to process
 * @param pr The PathResolver
 * @param scxml The parent SCXML document (or null)
 */
private static void addHistoryRules(final String xp,
    final ExtendedBaseRules scxmlRules, final List customActions,
    final PathResolver pr, final SCXML scxml) {
  scxmlRules.add(xp, new ObjectCreateRule(History.class));
  addPseudoStatePropertiesRules(xp, scxmlRules, customActions, pr,
    scxml);
  scxmlRules.add(xp, new UpdateModelRule(scxml));
  scxmlRules.add(xp, new SetPropertiesRule(new String[] {"type"},
    new String[] {"type"}));
  addTransitionRules(xp + XPF_TR, scxmlRules, "setTransition",
    pr, customActions);
  scxmlRules.add(xp, new SetNextRule("addHistory"));
}
origin: commons-scxml/commons-scxml

/**
 * Add Digester rules for all &lt;history&gt; elements.
 *
 * @param xp The Digester style XPath expression of the parent
 *           XML element
 * @param scxmlRules The rule set to be used for digestion
 * @param customActions The list of custom actions this digester needs
 *                      to be able to process
 * @param pr The PathResolver
 * @param scxml The parent SCXML document (or null)
 */
private static void addHistoryRules(final String xp,
    final ExtendedBaseRules scxmlRules, final List customActions,
    final PathResolver pr, final SCXML scxml) {
  scxmlRules.add(xp, new ObjectCreateRule(History.class));
  addPseudoStatePropertiesRules(xp, scxmlRules, customActions, pr,
    scxml);
  scxmlRules.add(xp, new UpdateModelRule(scxml));
  scxmlRules.add(xp, new SetPropertiesRule(new String[] {"type"},
    new String[] {"type"}));
  addTransitionRules(xp + XPF_TR, scxmlRules, "setTransition",
    pr, customActions);
  scxmlRules.add(xp, new SetNextRule("addHistory"));
}
org.apache.commons.digesterObjectCreateRule<init>

Javadoc

Construct an object create rule with the specified class.

Popular methods of ObjectCreateRule

    Popular in Java

    • Running tasks concurrently on multiple threads
    • getResourceAsStream (ClassLoader)
    • onRequestPermissionsResult (Fragment)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • Table (com.google.common.collect)
      A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
    • String (java.lang)
    • Path (java.nio.file)
    • TimerTask (java.util)
      The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
    • AtomicInteger (java.util.concurrent.atomic)
      An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
    • Base64 (org.apache.commons.codec.binary)
      Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
    • 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