Class AddressBuilder

java.lang.Object
org.ocpsoft.urlbuilder.AddressBuilder

public class AddressBuilder extends Object
Representation of a uniform resource locator, or web address. Internal state is stored as it is originally provided, and must be encoded or decoded as necessary.
Author:
Lincoln Baxter, III
  • Field Details

  • Constructor Details

    • AddressBuilder

      protected AddressBuilder()
  • Method Details

    • begin

      public static AddressBuilderBase begin()
      Create a new AddressBuilder instance.
    • build

      protected Address build()
      Generate an Address representing the current state of this AddressBuilder.
    • buildLiteral

      protected Address buildLiteral()
      Generate an Address representing the current literal state of this AddressBuilder.

      (Does not apply parameterization. E.g. The URL `/{foo}` will be treated as literal text, as opposed to calling build(), which would result in `foo` being treated as a parameterized expression)

    • create

      public static Address create(String url) throws IllegalArgumentException
      Create a new Address from the given URL. Improperly formatted or encoded URLs are not parse-able and will result in an exception. No builder parameterization is possible using this method.
      Throws:
      IllegalArgumentException - when the input URL or URL fragment is not valid.
    • toString

      public String toString()
      Overrides:
      toString in class Object