Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

io.ashdavies.auto:auto-decorator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.ashdavies.auto:auto-decorator

Generated implementations for common interfaces

  • 1.4.3
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

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}'
}

FAQs

Package last updated on 07 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc