Annotation Type TargetUrl


@Retention(RUNTIME) @Target(TYPE) public @interface TargetUrl
Define the url patterns for class.
All urls matching the pattern will be crawled and extracted for new objects.
Since:
0.2.0
Author:
code4crafter@gmail.com
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The url patterns for class.
    Use regex expression with some changes:
    "." stand for literal character "." instead of "any character".
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Define the region for url extracting.
  • Element Details

    • value

      String[] value
      The url patterns for class.
      Use regex expression with some changes:
      "." stand for literal character "." instead of "any character".
      "*" stand for any legal character for url in 0-n length ([^"'#]*) instead of "any length".
      Returns:
      the url patterns for class
    • sourceRegion

      String sourceRegion
      Define the region for url extracting.
      Only support XPath.
      When sourceRegion is set, the urls will be extracted only from the region instead of entire content.
      Returns:
      the region for url extracting
      Default:
      ""