Registry / utility / sourcecode-2-13

sourcecode-2-13

JSON →
library0.4.4javamavenunverified

A Scala library that provides source code metadata like file name and line number at compile time.

<dependency> <groupId>com.lihaoyi</groupId> <artifactId>sourcecode_2.13</artifactId> <version>0.4.4</version> </dependency>
INSTALL
IMPORT
SIG · SOURCECODE-2-13
S
sourcecode-2-13
utilityjavav0.4.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SourceFile
sourcecode.SourceFile

Gets the current source file name using the SourceFile macro.

import sourcecode.SourceFile; SourceFile sf = SourceFile.here(); System.out.println(sf.value());
Debug
Known issues
gotchaThis library is primarily designed for Scala and may have limited Java interop.
fix
Use Scala 2.13 compatible projects or consider alternative Java libraries for source code reflection.
affects: all
Upgrade
Version history
0.4.4latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
sourcecode-2-13 — mvn dependency:get sourcecode-2-13 · libregistry