Class JavaConstantResource
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.Resource
org.apache.tools.ant.types.resources.AbstractClasspathResource
org.apache.tools.ant.types.resources.JavaConstantResource
- All Implemented Interfaces:
Cloneable, Comparable<Resource>, Iterable<Resource>, ResourceCollection
A resource that is a java constant.
This lets you extract values off the classpath and use them elsewhere
- Since:
- Ant 1.7
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractClasspathResource
AbstractClasspathResource.ClassLoaderWithFlag -
Field Summary
Fields inherited from class Resource
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZEFields inherited from class ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamopen the input stream from a specific classloaderMethods inherited from class AbstractClasspathResource
createClasspath, dieOnCircularReference, getClassLoader, getClasspath, getInputStream, getLoader, getRef, isExists, setClasspath, setClasspathRef, setLoaderRef, setParentFirst, setRefidMethods inherited from class Resource
as, asOptional, clone, compareTo, equals, getLastModified, getMagicNumber, getName, getOutputStream, getSize, hashCode, isDirectory, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, size, toLongString, toStringMethods inherited from class DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributesMethods inherited from class ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface ResourceCollection
isEmpty, stream
-
Constructor Details
-
JavaConstantResource
public JavaConstantResource()
-
-
Method Details
-
openInputStream
open the input stream from a specific classloader- Specified by:
openInputStreamin classAbstractClasspathResource- Parameters:
cl- the classloader to use. Will be null if the system classloader is used- Returns:
- an open input stream for the resource
- Throws:
IOException- if an error occurs.
-