-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add option "onlyName" to generate only fields' name. * update Readme * Now examine the super classes * Add version 0.0.1 and 0.1.0 in changelog
- Loading branch information
Showing
23 changed files
with
407 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Change Log | ||
|
||
### [0.1.0] | ||
- Add option "onlyName" to generate only fields' name | ||
- Now examine the super classes | ||
|
||
### [0.0.1] | ||
- First fully functional version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/io/github/mhagnumdw/beaninfogenerator/builder/BeanMetaInfoClassBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.github.mhagnumdw.beaninfogenerator.builder; | ||
|
||
import javax.lang.model.element.Modifier; | ||
|
||
import com.squareup.javapoet.FieldSpec; | ||
|
||
import io.github.mhagnumdw.beaninfogenerator.BeanMetaInfo; | ||
import io.github.mhagnumdw.beaninfogenerator.Context; | ||
|
||
class BeanMetaInfoClassBuilder extends ClassBuilderAbstract implements ClassBuilder { | ||
|
||
public BeanMetaInfoClassBuilder(final Context context) { | ||
super(context); | ||
} | ||
|
||
@Override | ||
protected FieldSpec buildFieldSpec(final String fieldName) { | ||
// @formatter:off | ||
return FieldSpec | ||
.builder(BeanMetaInfo.class, fieldName) | ||
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL) | ||
.initializer("new BeanMetaInfo($S)", fieldName) | ||
.build(); | ||
// @formatter:on | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/io/github/mhagnumdw/beaninfogenerator/builder/ClassBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.github.mhagnumdw.beaninfogenerator.builder; | ||
|
||
import javax.lang.model.element.Element; | ||
|
||
import com.squareup.javapoet.JavaFile; | ||
|
||
public interface ClassBuilder { | ||
|
||
public JavaFile build(Element classElement); | ||
|
||
} |
Oops, something went wrong.