Codota Logo
ElementFinderFactory.getTypeFinder
Code IndexAdd Codota to your IDE (free)

How to use
getTypeFinder
method
in
com.novoda.sexp.finder.ElementFinderFactory

Best Java code snippets using com.novoda.sexp.finder.ElementFinderFactory.getTypeFinder (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of an XML tag into {@link Object} using the supplied {@link BodyMarshaller}
 *
 * @param bodyMarshaller The marshaller to parse the body into your required type
 * @param <T>            The type you wish to create from the XML body
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<T> getTypeFinder(BodyMarshaller<T> bodyMarshaller) {
  return getTypeFinder(new BasicParser<T>(bodyMarshaller));
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of an XML tag into an {@link Boolean}
 *
 * @return {@link ElementFinder}
 */
public ElementFinder<Boolean> getBooleanFinder() {
  return getTypeFinder(new BooleanBodyMarshaller());
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the attributes off an XML tag, these are then passed to your {@link AttributeMarshaller}
 * to create an object of type {@link Object}.
 *
 * @param attributeMarshaller The marshaller to parse the attributes into your required type
 * @param attrTags            The tags of the attributes you wish to parse
 * @param <T>                 The type you wish to create from the attributes
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<T> getAttributeFinder(AttributeMarshaller<T> attributeMarshaller, String... attrTags) {
  return getTypeFinder(new BasicAttributeParser<T>(attributeMarshaller, attrTags));
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of an XML tag into a {@link String}
 *
 * @return {@link ElementFinder}
 */
public ElementFinder<String> getStringFinder() {
  return getTypeFinder(new StringBodyMarshaller());
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of an XML tag into an {@link Integer}
 *
 * @return {@link ElementFinder}
 */
public ElementFinder<Integer> getIntegerFinder() {
  return getTypeFinder(new IntegerBodyMarshaller());
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of all XML tags with the {@code tag} argument
 * into a {@link java.util.List} of {@link Object} using the supplied {@link BodyMarshaller}.
 * <pre>
 * {@code <names>
 *     <name>Paul</name>
 *     <name>Peter</name>
 *   </names>
 *
 * ElementFinder<T> finder = getListFinder("name", marshallerOfT);
 * finder.find(element, "names");
 * List<T> names = finder.getResultOrThrow();
 * }
 * </pre>
 *
 * @param tag            The tag to parse the body for each list element
 * @param bodyMarshaller The marshaller to parse the body into your required type
 * @param <T>            The type you wish to create from the XML body
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<List<T>> getListFinder(String tag, BodyMarshaller<T> bodyMarshaller) {
  return getTypeFinder(new ListParser<T>(tag, this, bodyMarshaller));
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of an XML tag into a simple {@link Integer} wrapper class. This is a class that
 * has a constructor that takes a single primitive int parameter.
 *
 * @param clazz The class of your Integer Wrapper Class
 * @param <T>   The type you wish to create from the XML body
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<T> getIntegerWrapperTypeFinder(Class<T> clazz) {
  return getTypeFinder(new BasicParser<T>(getIntegerWrapperMarshaller(clazz)));
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of an XML tag into a simple {@link String} wrapper class. This is a class that
 * has a constructor that takes a single {@link String} parameter.
 *
 * @param clazz The class of your String Wrapper Class
 * @param <T>   The type you wish to create from the XML body
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<T> getStringWrapperTypeFinder(Class<T> clazz) {
  return getTypeFinder(new BasicParser<T>(getStringWrapperMarshaller(clazz)));
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of all XML tags with the {@code tag} argument
 * into a {@link java.util.List} of {@link Object}. This is a simple Integer wrapper class that
 * has a constructor that takes a single {@link Integer} parameter.<br/>
 * See {@link #getIntegerWrapperTypeFinder(Class)} for more info.
 *
 * @param tag   The tag to parse the body for each list element
 * @param clazz The class of the wrapper type you wish your List to be made of
 * @param <T>   The type you wish to create from the XML body
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<List<T>> getIntegerWrapperTypeListFinder(String tag, Class<T> clazz) {
  return getTypeFinder(new ListParser<T>(tag, this, getIntegerWrapperMarshaller(clazz)));
}
origin: novoda/simple-easy-xml-parser

/**
 * Will parse the body of all XML tags with the {@code tag} argument
 * into a {@link java.util.List} of {@link Object}. This is a simple String wrapper class that
 * has a constructor that takes a single {@link String} parameter.<br/>
 * See {@link #getStringWrapperTypeFinder(Class)} for more info.
 *
 * @param tag   The tag to parse the body for each list element
 * @param clazz The class of the wrapper type you wish your List to be made of
 * @param <T>   The type you wish to create from the XML body
 * @return {@link ElementFinder}
 */
public <T> ElementFinder<List<T>> getStringWrapperTypeListFinder(String tag, Class<T> clazz) {
  return getTypeFinder(new ListParser<T>(tag, this, getStringWrapperMarshaller(clazz)));
}
origin: novoda/simple-easy-xml-parser

@Override
public void execute() {
  ElementFinderFactory factory = SimpleEasyXmlParser.getElementFinderFactory();
  elementFinder = factory.getTypeFinder(new PodcastChannelParser(factory));
  Instigator instigator = new PodcastInstigator(elementFinder, finishWatcher);
  SimpleEasyXmlParser.parse(PodcastExampleHelper.SINGLE_PODCAST_ITEM, instigator);
}
origin: novoda/simple-easy-xml-parser

public PodcastChannelParser(ElementFinderFactory factory) {
  this.podcastItemFinder = factory.getListElementFinder(new PodcastItemParser(factory), parseWatcher);
  this.titleFinder = factory.getStringWrapperTypeFinder(Title.class);
  this.linkFinder = factory.getStringWrapperTypeFinder(Link.class);
  this.imageFinder = factory.getTypeFinder(new ChannelImageParser(factory));
}
origin: novoda/simple-easy-xml-parser

public FeedParser(ElementFinderFactory factory) {
  this.idFinder = factory.getStringFinder();
  this.titleFinder = factory.getStringFinder();
  this.updatedFinder = factory.getStringFinder();
  this.authorFinder = factory.getTypeFinder(new AuthorParser(factory));
  this.logoFinder = factory.getStringFinder();
  this.generatorFinder = factory.getStringFinder();
  this.linkFinder = factory.getAttributeFinder(new LinkAttributeMarshaller(), ATTR_HREF, ATTR_REL, ATTR_TITLE, ATTR_TYPE);
  this.entryFinder = factory.getListElementFinder(new EntryParser(factory), parseWatcher);
}
com.novoda.sexp.finderElementFinderFactorygetTypeFinder

Javadoc

Will parse the body of an XML tag into Object using the supplied BodyMarshaller

Popular methods of ElementFinderFactory

  • getListElementFinder
    Will parse an XML tag into Object then inform the ParseWatcherThe idea is to have a callback for a n
  • getAttributeFinder
    Will parse the attributes off an XML tag, these are then passed to your AttributeMarshallerto create
  • getStringFinder
    Will parse the body of an XML tag into a String
  • <init>
  • getIntegerFinder
    Will parse the body of an XML tag into an Integer
  • getIntegerWrapperMarshaller
  • getListAttributeFinder
    Will parse the attributes off an XML tag, into Object then inform the ParseWatcherThe idea is to hav
  • getStringWrapperMarshaller
  • getStringWrapperTypeFinder
    Will parse the body of an XML tag into a simple String wrapper class. This is a class that has a con
  • getStringWrapperTypeListFinder
    Will parse the body of all XML tags with the tag argument into a java.util.List of Object. This is a

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFileChooser (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now