annotations

Annotation Processor for generating creator classes

License

License

The MIT License
Categories

Categories

Net
GroupId

GroupId

net.octyl.apt-creator
ArtifactId

ArtifactId

apt-creator-annotations
Last Version

Last Version

0.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

annotations
Annotation Processor for generating creator classes
Project URL

Project URL

https://github.com/kenzierocks/apt-creator
Source Code Management

Source Code Management

https://github.com/kenzierocks/apt-creator

Download apt-creator-annotations

How to add to project

<!-- https://jarcasting.com/artifacts/net.octyl.apt-creator/apt-creator-annotations/ -->
<dependency>
    <groupId>net.octyl.apt-creator</groupId>
    <artifactId>apt-creator-annotations</artifactId>
    <version>0.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/net.octyl.apt-creator/apt-creator-annotations/
implementation 'net.octyl.apt-creator:apt-creator-annotations:0.1.4'
// https://jarcasting.com/artifacts/net.octyl.apt-creator/apt-creator-annotations/
implementation ("net.octyl.apt-creator:apt-creator-annotations:0.1.4")
'net.octyl.apt-creator:apt-creator-annotations:jar:0.1.4'
<dependency org="net.octyl.apt-creator" name="apt-creator-annotations" rev="0.1.4">
  <artifact name="apt-creator-annotations" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.octyl.apt-creator', module='apt-creator-annotations', version='0.1.4')
)
libraryDependencies += "net.octyl.apt-creator" % "apt-creator-annotations" % "0.1.4"
[net.octyl.apt-creator/apt-creator-annotations "0.1.4"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

apt-creator

Annotation processor for making factory/creator implementations, like Auto Factory. Supports less features, but was written since Auto Factory had not updated to JDK 9+ in many months.

Usage

apt-creator is very similar to Auto Factory. Simply annotate your class with @GenerateCreator, and any parameters that should be injected (via JSR 330) with @Provided.

Multiple constructors are supported as long as they don't create duplicate signatures after any @Provided arguments are dropped.

The generated class will be named the same way that Auto Factory names factories. A top-level class Foo will generate FooCreator. A class Bar nested inside Biz will generate Biz_BarCreator. You may override the name like with Auto Factory by setting className, e.g. @GenerateCreator(className = "FezFactory") will generate a class named FezFactory. This allows for full control over the name if needed.

Versions

Version
0.1.4
0.1.3
0.1.1