package saker.build.runtime.classpath
ClassPathServiceEnumerator implementation for locating a service for a class name and expected type.
The implementation will throw a ClassPathEnumerationError if the retrieved class is not an instance of the expected type.
TThe type of the requested service.
public | For Externalizable. |
public | NamedCheckingClassPathServiceEnumerator( Creates a new enumerator for the given class name and expected type. |
protected Iterable< | createIterable( Creates a lazily instantiating Iterable for the found class. |
public Class< | Gets the class that the service is expected to be an instance of. |
public void | The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays. |
public void | The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays. |
From: NamedClassPathServiceEnumerator< |
From: Object |
For Externalizable.
public NamedCheckingClassPathServiceEnumerator(String className, Class<?> expectedInstanceOf ) throws NullPointerException
Creates a new enumerator for the given class name and expected type.
classNameThe class name of the service to look up.
expectedInstanceOfThe expected type to check the service for.
NullPointerExceptionIf any of the arguments are
null
.Overridden from: NamedClassPathServiceEnumerator
Creates a lazily instantiating Iterable for the found class.
foundThe found class.
The created iterable.
Gets the class that the service is expected to be an instance of.
The class.
Overridden from: Externalizable
The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays. The
readExternal method must read the values in the same sequence
and with the same types as were written by writeExternal.
inthe stream to read data from in order to restore the object
IOExceptionif I/O errors occur
ClassNotFoundExceptionIf the class for an object being
restored cannot be found.
Overridden from: Externalizable
The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays.
outthe stream to write the object to
IOExceptionIncludes any I/O exceptions that may occur