Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
io.ashdavies.auto:auto-decorator
Advanced tools
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);
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();
Deprecated
Please use JakeWharton/AutoValueAnnotations instead
dependencies {
compile 'io.ashdavies.auto:auto-value:{current-version}'
}
FAQs
Generated implementations for common interfaces
We found that io.ashdavies.auto:auto-decorator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.