Class JavaConstantResource

All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Resource>, java.lang.Iterable<Resource>, ResourceCollection

public class JavaConstantResource
extends AbstractClasspathResource
A resource that is a java constant. This lets you extract values off the classpath and use them elsewhere
Since:
Ant 1.7
  • Constructor Details

  • Method Details

    • openInputStream

      protected java.io.InputStream openInputStream​(java.lang.ClassLoader cl) throws java.io.IOException
      open the input stream from a specific classloader
      Specified by:
      openInputStream in class AbstractClasspathResource
      Parameters:
      cl - the classloader to use. Will be null if the system classloader is used
      Returns:
      an open input stream for the resource
      Throws:
      java.io.IOException - if an error occurs.