PortableResourceMacro

izumi.fundamentals.platform.resources.PortableResource.PortableResourceMacro

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def embedResources(_path: Expr[String], _check: Expr[Boolean])(using quotes: Quotes): Expr[Map[String, String]]
def embedSources(_pathExpr: Expr[String], _check: Expr[Boolean])(using quotes: Quotes): Expr[Map[String, String]]

Inherited methods

protected def chunkString(content: String): Seq[String]

Split content into pieces small enough to be emitted as individual JVM constant-pool string literals. A CONSTANT_Utf8 entry stores its length in an unsigned 16-bit field, so it cannot exceed 65535 bytes of modified UTF-8. A single char encodes to at most 3 modified-UTF-8 bytes (lone surrogates included), so chunking at maxChunkChars characters keeps every chunk under the limit regardless of content. Splitting mid-surrogate-pair is safe: re-concatenating the chunks at runtime reproduces the original string exactly.

Split content into pieces small enough to be emitted as individual JVM constant-pool string literals. A CONSTANT_Utf8 entry stores its length in an unsigned 16-bit field, so it cannot exceed 65535 bytes of modified UTF-8. A single char encodes to at most 3 modified-UTF-8 bytes (lone surrogates included), so chunking at maxChunkChars characters keeps every chunk under the limit regardless of content. Splitting mid-surrogate-pair is safe: re-concatenating the chunks at runtime reproduces the original string exactly.

Attributes

Inherited from:
PortableResourceBase
protected def doExtractSources[T](maybeRoot: Option[String], pathExpr: String): Seq[(String, String)]

Attributes

Inherited from:
PortableResourceBase
protected def extractResourceContents(sourcePath: String, classGraph: ClassGraph): Either[String, Seq[(String, String)]]

Attributes

Inherited from:
PortableResourceBase
protected def extractResourceContents(sourcePath: String): Either[String, Seq[(String, String)]]

Attributes

Inherited from:
PortableResourceBase
protected def walkTree(file: File): Iterable[File]

Attributes

Inherited from:
PortableResourceBase