Annotation Interface Composable
Generate an abstract class for compositions.
The resulting class is abstract. Its constructor takes an instance of the same type and each method is final and delegates to the same method of the delegate.
Example
@Composable
public interface FooBar<T>
{
void foo(T foo);
T bar(String bazz) throws IOException;
}
will generate this code
public abstract class FooBarComposition<T> implements FooBar<T> {
private final FooBar<T> mDelegate;
public FooBarComposition(FooBar<T> delegate) {
mDelegate = delegate;
}
public final void foo(T foo) {
mDelegate.foo(foo);
}
public final T bar(String bazz) throws IOException {
return mDelegate.bar(bazz);
}
}
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the generated class.The package name of the generated class.
-
Element Details