java.lang.Object
uk.autores.handling.Resource
- All Implemented Interfaces:
CharSequence
A representation of the annotated resource.
The
CharSequence implementation is the path.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFor retrieving resource contents. -
Constructor Summary
ConstructorsConstructorDescriptionResource(Resource.ResourceOpener file, String path) All arguments must be non-null. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) intlength()open()Opens resource for reading.subSequence(int start, int end) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
Resource
All arguments must be non-null.- Parameters:
file- resource bytespath- as defined inResourceFiles.value()
-
-
Method Details
-
open
Opens resource for reading.- Returns:
- contents
- Throws:
IOException- on I/O error- See Also:
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject- Returns:
- path passed to the constructor
-