Class JAXBResourceFactory

java.lang.Object
com.peterphi.std.guice.common.serviceprops.jaxbref.JAXBResourceFactory

public class JAXBResourceFactory extends Object
  • Constructor Details

  • Method Details

    • get

      public <T> T get(Class<T> clazz, String name)
      Resolve the JAXB resource, permitting caching behind the scenes
      Type Parameters:
      T -
      Parameters:
      clazz - the jaxb resource to read
      name - the name of the property
      Returns:
    • get

      public <T> T get(Class<T> clazz, String name, T defaultValue)
      Resolve the JAXB resource, permitting caching behind the scenes
      Type Parameters:
      T -
      Parameters:
      clazz - the jaxb resource to read
      name - the name of the property
      defaultValue - the default value to return if the property is missing
      Returns:
    • getOnce

      public <T> T getOnce(Class<T> clazz, String name)
      Resolve the JAXB resource once without caching anything
      Type Parameters:
      T -
      Parameters:
      clazz -
      name -
      Returns: