AutoExtends

General

Category
Free
Tag
APT
License
Apache License, Version 2.0
Min SDK
1 (Android 1.0)
Registered
Sep 22, 2019
Favorites
0
Link
https://github.com/andob/AutoExtends
See also
Curson
SharedPreferencesGenerator
Immutables
Mara
Symbols

Additional

Language
Java
Version
1.0.0 (Sep 19, 2019)
Created
Sep 17, 2019
Updated
Sep 20, 2019
Owner
Andrei Dobrescu (andob)
Contributors
Andrei Dobrescu (andob)
andob001
2
Activity
Badge
Generate
Download
Source code

Promotion

AutoExtends

Java annotation processor that generates empty interface / abstract class implementations

1. Import

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    implementation 'com.github.andob.AutoExtends:annotations:1.0.0'
    annotationProcessor 'com.github.andob.AutoExtends:processor:1.0.0'
}

2. Annotate your abstract class / interface with @GenerateImplementation

@GenerateImplementation(name = "SomeInterfaceImpl")
public interface SomeInterface
{
    void f1();
    int f2(int x);
    List<Point> f3(Point x, Point y);
}

3. Hit build! The annotation processor will generate the following class:

public class SomeInterfaceImpl implements SomeInterface
{
    @Override
    public void f1()
    {
    }

    @Override
    public int f2(int x)
    {
        return 0;
    }

    @Override
    public List<Point> f3(Point x, Point y)
    {
        return null;
    }
}

License

Copyright 2019 Andrei Dobrescu

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.`