Record Class ClassResourceLoadableResource
java.lang.Object
java.lang.Record
dev.pfaff.altargui.resource.ClassResourceLoadableResource
- Record Components:
clazz
-resource
-
- All Implemented Interfaces:
LoadableResource
,LoadableResource.ByInputStream
public record ClassResourceLoadableResource(Class<?> clazz, String resource)
extends Record
implements LoadableResource.ByInputStream
When running with modules, the
clazz
's module must open the resource to
this class's module.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.altargui.resource.LoadableResource
LoadableResource.ByBytes, LoadableResource.ByInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionClassResourceLoadableResource
(Class<?> clazz, String resource) Creates an instance of aClassResourceLoadableResource
record class. -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> clazz()
Returns the value of theclazz
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NonNull InputStream
resource()
Returns the value of theresource
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.pfaff.altargui.resource.LoadableResource
readString
Methods inherited from interface dev.pfaff.altargui.resource.LoadableResource.ByInputStream
readBytes
-
Constructor Details
-
ClassResourceLoadableResource
-
-
Method Details
-
openInputStream
- Specified by:
openInputStream
in interfaceLoadableResource
- Throws:
IOException
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
clazz
-
resource
-