Class AbstractLoader
java.lang.Object
org.objenesis.tck.AbstractLoader
Class loading a property file and delegating the treatment of each line to a concrete implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceHandler for reporting errors from the AbstractLoader.static classError handler that logs errors to a text stream. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLoader(ClassLoader classloader, AbstractLoader.ErrorHandler errorHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidhandlePropertyEntry(Class<?> clazz, String description, Candidate.CandidateType type) Will receive one class and its description pairs from the filevoidloadFrom(InputStream inputStream, Candidate.CandidateType type) voidloadFromResource(String resource, Candidate.CandidateType type) Load a candidate property file
-
Constructor Details
-
AbstractLoader
- Parameters:
classloader- ClassLoader from which candidates classes are loadederrorHandler- Handler called in case of error
-
-
Method Details
-
loadFrom
- Parameters:
inputStream- Stream containing the propertiestype- Type of the candidate loaded from the stream- Throws:
IOException- If something goes wrong while reading the stream
-
loadFromResource
Load a candidate property file- Parameters:
resource- File nametype- Type of the candidate loaded from the stream- Throws:
IOException- If there's problem reading the file
-
handlePropertyEntry
protected abstract void handlePropertyEntry(Class<?> clazz, String description, Candidate.CandidateType type) Will receive one class and its description pairs from the file- Parameters:
clazz- class on the linedescription- description of the classtype- type of the candidate
-