trait ResourceEntry[+E <: Resource] extends Closeable
This class is an entry for resources that transforms an actual file/folder into any resource representation. Default representations of type Resource may be automatically attached.
- Alphabetic
- By Inheritance
- ResourceEntry
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def attachRepresentation[R <: ResourceRepresentation](tag: String = null)(implicit arg0: ClassTag[R], factory: ResourceRepresentationFactory[R, E]): R
Links a resource with a resource class and a String tag which represent it.
Links a resource with a resource class and a String tag which represent it.
- R
the type of the resource representation.
- tag
the tag used to refer the representation.
- factory
the factory which will create a representation instance of type R.
- Annotations
- @throws("If the requested resource type is incompatible with the resource it targets.")
- Exceptions thrown
IncompatibleResourceTypeException
If the requested resource type is incompatible with the name it targets. For example, if an ResourceFolder type is requested, but the name targets a resource file, as the resource can't be handled as a folder, the implementation may throw this exception.
- abstract def close(): Unit
- Definition Classes
- Closeable → AutoCloseable
- Annotations
- @throws(classOf[java.io.IOException])
- abstract def findRepresentation[R <: ResourceRepresentation](tag: String = null)(implicit arg0: ClassTag[R]): Option[R]
Tries to Retrieves the wanted representation of the resource.
Tries to Retrieves the wanted representation of the resource. The representation must extends R
- R
the kind of resource expected.
- returns
Some if a representation of type R was found, or None instead
- abstract def getRepresentation[R <: ResourceRepresentation](tag: String = null)(implicit arg0: ClassTag[R]): R
Retrieves the wanted representation of the resource.
Retrieves the wanted representation of the resource.
- R
the type of resource expected.
- returns
the expected resource representation.
- Annotations
- @throws("If a resource was found but with another type than R.") @NotNull()
- Exceptions thrown
NoSuchRepresentationException
if the resource haven't any attached representation of type R.
- abstract def getResource: Resource
A representation of the folder that contains this resource.
- abstract def name: String
This resource name
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getOrAttachRepresentation[R <: ResourceRepresentation](tag: String = null)(implicit arg0: ClassTag[R], factory: ResourceRepresentationFactory[R, E]): R
Retrieves the wanted representation of the resource.
Retrieves the wanted representation of the resource. If no resource is found, create one.
- R
the type of resource expected.
- returns
the expected resource representation.
- Annotations
- @throws("If a resource was found but with another type than R.") @NotNull()
- Exceptions thrown
NoSuchRepresentationException
if the resource haven't any attached representation of type R.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated