Auto Decorator

Generated implementations for common interfaces

Лицензия

Лицензия

Категории

Категории

Auto Библиотеки уровня приложения Code Generators
Группа

Группа

io.ashdavies.auto
Идентификатор

Идентификатор

auto-decorator
Последняя версия

Последняя версия

1.4.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Auto Decorator
Generated implementations for common interfaces
Ссылка на сайт

Ссылка на сайт

https://github.com/ashdavies/auto
Система контроля версий

Система контроля версий

https://github.com/ashdavies/auto

Скачать auto-decorator

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.ashdavies.auto/auto-decorator/ -->
<dependency>
    <groupId>io.ashdavies.auto</groupId>
    <artifactId>auto-decorator</artifactId>
    <version>1.4.3</version>
</dependency>
// https://jarcasting.com/artifacts/io.ashdavies.auto/auto-decorator/
implementation 'io.ashdavies.auto:auto-decorator:1.4.3'
// https://jarcasting.com/artifacts/io.ashdavies.auto/auto-decorator/
implementation ("io.ashdavies.auto:auto-decorator:1.4.3")
'io.ashdavies.auto:auto-decorator:jar:1.4.3'
<dependency org="io.ashdavies.auto" name="auto-decorator" rev="1.4.3">
  <artifact name="auto-decorator" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.ashdavies.auto', module='auto-decorator', version='1.4.3')
)
libraryDependencies += "io.ashdavies.auto" % "auto-decorator" % "1.4.3"
[io.ashdavies.auto/auto-decorator "1.4.3"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Auto

Build Status Coverage License

Auto: Decorator

core compiler

Usage

dependencies {
  compile 'io.ashdavies.auto:auto-decorator:{current-version}'
  annotationProcessor 'io.ashdavies.auto:auto-decorator-compiler:{current-version}'
}

Normal Usage

Generate decorated implementations for interfaces or abstract classes.

@AutoDecorator
interface Listener {

  void onError(Throwable throwable);
}
listener = new ListenerDecorator(decorated);

Inner Class Usage

If you annotate an inner class its name will be prefixed with the outer class.

class Presenter {

  @AutoDecorator
  interface Listener {

    void onError(Throwable throwable);
  }
}
listener = new Presenter$ListenerDecorator(decorated);

Iterable Usage

Optionally you can generate an implementation that accepts multiple decorated classes. This only works for methods without a return type since the correct return cannot be distinguished. Return types will be supported with the implementation of merge strategies.

@AutoDecorator(iterable = true)
interface Listener {

  void onError(Throwable throwable)
}
listener = new ListenerDecorator(first, second, third);

Auto: No-Op

core compiler

Usage

dependencies {
  compile 'io.ashdavies.auto:auto-no-op:{current-version}'
  annotationProcessor 'io.ashdavies.auto:auto-no-op-compiler:{current-version}'
}

Normal Usage

Generate non operational implementations for interfaces or abstract classes.

@AutoNoOp
interface Listener {

  void onError(Throwable throwable);
}
listener = new ListenerNoOp();

Instance Usage

Optionally, you can instruct the processor to generate a static instance for repeated usage.

@AutoNoOp(instance = true)
interface Listener {

  void onError(Throwable throwable);
}
listener = ListenerNoOp.instance();

Auto: Value

core

Deprecated
Please use JakeWharton/AutoValueAnnotations instead

Usage

dependencies {
  compile 'io.ashdavies.auto:auto-value:{current-version}'
}

Версии библиотеки

Версия
1.4.3