SpiceIt Injector

SpiceIt Injector implements the magic behind SpiceIt.

License

License

GroupId

GroupId

gg.neko.spiceit
ArtifactId

ArtifactId

spiceit-injector
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

SpiceIt Injector
SpiceIt Injector implements the magic behind SpiceIt.

Download spiceit-injector

How to add to project

<!-- https://jarcasting.com/artifacts/gg.neko.spiceit/spiceit-injector/ -->
<dependency>
    <groupId>gg.neko.spiceit</groupId>
    <artifactId>spiceit-injector</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/gg.neko.spiceit/spiceit-injector/
implementation 'gg.neko.spiceit:spiceit-injector:0.1'
// https://jarcasting.com/artifacts/gg.neko.spiceit/spiceit-injector/
implementation ("gg.neko.spiceit:spiceit-injector:0.1")
'gg.neko.spiceit:spiceit-injector:jar:0.1'
<dependency org="gg.neko.spiceit" name="spiceit-injector" rev="0.1">
  <artifact name="spiceit-injector" type="jar" />
</dependency>
@Grapes(
@Grab(group='gg.neko.spiceit', module='spiceit-injector', version='0.1')
)
libraryDependencies += "gg.neko.spiceit" % "spiceit-injector" % "0.1"
[gg.neko.spiceit/spiceit-injector "0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
gg.neko.spiceit : spiceit-api jar 0.1
org.slf4j : slf4j-api jar 1.7.29
org.javassist : javassist jar 3.26.0-GA

test (4)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
org.junit.jupiter : junit-jupiter-api jar 5.5.2
org.junit.jupiter : junit-jupiter-engine jar 5.5.2
org.mockito : mockito-junit-jupiter jar 3.1.0

Project Modules

There are no modules declared in this project.

SpiceIt

A collection of nice, easy to use features to make your code spicier.

Build Status Coveralls github branch LGTM Grade GitHub nyan

With SpiceIt, this class: example class

produces this output: example output

Getting started

SpiceIt features are exposed by the API module: go on and import it as a Maven dependency:

<dependency>
    <groupId>gg.neko.spiceit</groupId>
    <artifactId>spiceit-api</artifactId>
    <version>0.1</version>
</dependency>

Making it work

SpiceIt needs to inject its magic into your bytecode.
It can do so with either its Maven plugin or its Java agent.

  • Maven plugin
    add this plugin to your pom.xml plugins section:
    <plugin>
        <groupId>gg.neko.spiceit</groupId>
        <artifactId>spiceit-maven-plugin</artifactId>
        <version>0.1</version>
        <executions>
            <execution>
                <goals>
                    <goal>spiceit</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
  • Java agent
    download the agent from Maven Central Repository (or compile it from source, if that's your thing) and launch your application with this option:
    -javaagent:spiceit-agent-0.1-jar-with-dependencies.jar

Check out the example projects making use of Maven plugin and Java agent.

Available features

Here are the spicy features!

  • LogIt logs methods entry, exit and error
  • TimeIt logs methods execution time

More coming soon™ 😎

Transitive dependencies

Just SLF4J for logging, already provided by SpiceIt API module.
Since it's a simple façade for various logging framework, you can choose your favorite implementation, e.g. logback or log4j.

License

Licensed under the MIT License.

Versions

Version
0.1