-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add support for inheritance Close #3
- Loading branch information
Showing
59 changed files
with
1,807 additions
and
235 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# metter demo | ||
|
||
- [Simple domain](src/main/java/dev/alexengrig/metter/demo/simple/SimpleDomain.java) | ||
- [Domain with custom name](src/main/java/dev/alexengrig/metter/demo/naming/NamedDomain.java) | ||
- [Excluding](src/main/java/dev/alexengrig/metter/demo/excluding) | ||
- [Domain with excluded getters/setters](src/main/java/dev/alexengrig/metter/demo/excluding/ExcludedDomain.java) | ||
- [Inherited domain with excluded getters/setters](src/main/java/dev/alexengrig/metter/demo/excluding/InheritedExcludedDomain.java) | ||
- [Including](src/main/java/dev/alexengrig/metter/demo/including) | ||
- [Domain with included getters/setters](src/main/java/dev/alexengrig/metter/demo/including/IncludedDomain.java) | ||
- [Inherited domain with included getters/setters](src/main/java/dev/alexengrig/metter/demo/including/InheritedIncludedDomain.java) | ||
- [Including and excluding](src/main/java/dev/alexengrig/metter/demo/includingandexcluding) | ||
- [Domain with included and excluded getters/setters](src/main/java/dev/alexengrig/metter/demo/includingandexcluding/IncludedAndExcludedDomain.java) | ||
- [Inherited domain with included and excluded getters/setters](src/main/java/dev/alexengrig/metter/demo/includingandexcluding/InheritedIncludedAndExcludedDomain.java) | ||
- [Inheritance](src/main/java/dev/alexengrig/metter/demo/inheritance) | ||
- [Lombok Data annotation](src/main/java/dev/alexengrig/metter/demo/lombokdata) | ||
- [Domain with Lombok Data annotation](src/main/java/dev/alexengrig/metter/demo/lombokdata/LombokDataDomain.java) | ||
- [Inherited domain with Lombok Data annotation](src/main/java/dev/alexengrig/metter/demo/lombokdata/InheritedLombokDataDomain.java) | ||
- [Lombok Getter and Setter annotations on class](src/main/java/dev/alexengrig/metter/demo/lombokgetterandsetter) | ||
- [Domain with Lombok Getter and Setter annotations on class](src/main/java/dev/alexengrig/metter/demo/lombokgetterandsetter/LombokGetterAndSetterDomain.java) | ||
- [Inherited domain with Lombok Getter and Setter annotations on class](src/main/java/dev/alexengrig/metter/demo/lombokgetterandsetter/InheritedLombokGetterAndSetterDomain.java) | ||
- [Lombok Getter and Setter annotations on field](src/main/java/dev/alexengrig/metter/demo/lombokgettersandsetters) | ||
- [Domain with Lombok Getter and Setter annotations on field](src/main/java/dev/alexengrig/metter/demo/lombokgettersandsetters/LombokGettersAndSettersDomain.java) | ||
- [Inherited domain with Lombok Getter and Setter annotations on field](src/main/java/dev/alexengrig/metter/demo/lombokgettersandsetters/InheritedLombokGettersAndSettersDomain.java) | ||
- [Private getters and setters](src/main/java/dev/alexengrig/metter/demo/privategettersandsetters) | ||
- [Domain with private getters and setters](src/main/java/dev/alexengrig/metter/demo/privategettersandsetters/PrivateGettersAndSettersDomain.java) | ||
- [Inherited domain with private getters and setters](src/main/java/dev/alexengrig/metter/demo/privategettersandsetters/InheritedPrivateGettersAndSettersDomain.java) | ||
- [Lombok Getter and Setter annotations on class with private access](src/main/java/dev/alexengrig/metter/demo/privatelombokgetterandsetter) | ||
- [Domain with Lombok Getter and Setter annotations on class with private access](src/main/java/dev/alexengrig/metter/demo/privatelombokgetterandsetter/PrivateLombokGetterAndSetterDomain.java) | ||
- [Inherited domain with Lombok Getter and Setter annotations on class with private access](src/main/java/dev/alexengrig/metter/demo/privatelombokgetterandsetter/InheritedPrivateLombokGetterAndSetterDomain.java) | ||
- [Lombok Getter and Setter annotations on field with private access](src/main/java/dev/alexengrig/metter/demo/privatelombokgettersandsetters) | ||
- [Domain with Lombok Getter and Setter annotations on field with private access](src/main/java/dev/alexengrig/metter/demo/privatelombokgettersandsetters/PrivateLombokGettersAndSettersDomain.java) | ||
- [Inherited domain with Lombok Getter and Setter annotations on field with private access](src/main/java/dev/alexengrig/metter/demo/privatelombokgettersandsetters/InheritedPrivateLombokGettersAndSettersDomain.java) | ||
- [Domain without package](src/main/java/NoPackageDomain.java) | ||
|
||
- [Motivation code](src/main/java/dev/alexengrig/metter/motivation) |
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
39 changes: 39 additions & 0 deletions
39
demo/src/main/java/dev/alexengrig/metter/demo/excluding/InheritedExcludedDomain.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,39 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.excluding; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
|
||
@GetterSupplier(excludedFields = {"excluded", "alsoExcluded"}) | ||
@SetterSupplier(excludedFields = {"excluded", "alsoExcluded"}) | ||
public class InheritedExcludedDomain extends ExcludedDomain { | ||
private int alsoExcluded; | ||
|
||
public InheritedExcludedDomain(int integer, int excluded, int alsoExcluded) { | ||
super(integer, excluded); | ||
this.alsoExcluded = alsoExcluded; | ||
} | ||
|
||
public int getAlsoExcluded() { | ||
return alsoExcluded; | ||
} | ||
|
||
public void setAlsoExcluded(int alsoExcluded) { | ||
this.alsoExcluded = alsoExcluded; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
demo/src/main/java/dev/alexengrig/metter/demo/including/InheritedIncludedDomain.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,49 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.including; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
|
||
@GetterSupplier(includedFields = {"included", "alsoIncluded"}) | ||
@SetterSupplier(includedFields = {"included", "alsoIncluded"}) | ||
public class InheritedIncludedDomain extends IncludedDomain { | ||
private int alsoIncluded; | ||
private int alsoIgnored; | ||
|
||
public InheritedIncludedDomain(int included, int ignored, int alsoIncluded, int alsoIgnored) { | ||
super(included, ignored); | ||
this.alsoIncluded = alsoIncluded; | ||
this.alsoIgnored = alsoIgnored; | ||
} | ||
|
||
public int getAlsoIncluded() { | ||
return alsoIncluded; | ||
} | ||
|
||
public void setAlsoIncluded(int alsoIncluded) { | ||
this.alsoIncluded = alsoIncluded; | ||
} | ||
|
||
public int getAlsoIgnored() { | ||
return alsoIgnored; | ||
} | ||
|
||
public void setAlsoIgnored(int alsoIgnored) { | ||
this.alsoIgnored = alsoIgnored; | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
.../dev/alexengrig/metter/demo/includingandexcluding/InheritedIncludedAndExcludedDomain.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,59 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.includingandexcluding; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
|
||
@GetterSupplier(includedFields = {"included", "alsoIncluded"}, excludedFields = {"excluded", "alsoExcluded"}) | ||
@SetterSupplier(includedFields = {"included", "alsoIncluded"}, excludedFields = {"excluded", "alsoExcluded"}) | ||
public class InheritedIncludedAndExcludedDomain extends IncludedAndExcludedDomain { | ||
private int alsoIncluded; | ||
private int alsoIgnored; | ||
private int alsoExcluded; | ||
|
||
public InheritedIncludedAndExcludedDomain(int included, int ignored, int excluded, int alsoIncluded, int alsoIgnored, int alsoExcluded) { | ||
super(included, ignored, excluded); | ||
this.alsoIncluded = alsoIncluded; | ||
this.alsoIgnored = alsoIgnored; | ||
this.alsoExcluded = alsoExcluded; | ||
} | ||
|
||
public int getAlsoIncluded() { | ||
return alsoIncluded; | ||
} | ||
|
||
public void setAlsoIncluded(int alsoIncluded) { | ||
this.alsoIncluded = alsoIncluded; | ||
} | ||
|
||
public int getAlsoIgnored() { | ||
return alsoIgnored; | ||
} | ||
|
||
public void setAlsoIgnored(int alsoIgnored) { | ||
this.alsoIgnored = alsoIgnored; | ||
} | ||
|
||
public int getAlsoExcluded() { | ||
return alsoExcluded; | ||
} | ||
|
||
public void setAlsoExcluded(int alsoExcluded) { | ||
this.alsoExcluded = alsoExcluded; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
demo/src/main/java/dev/alexengrig/metter/demo/inheritance/FatherDomain.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,38 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.inheritance; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
|
||
@GetterSupplier | ||
@SetterSupplier | ||
public class FatherDomain { | ||
private int fatherInt; | ||
|
||
public FatherDomain(int fatherInt) { | ||
this.fatherInt = fatherInt; | ||
} | ||
|
||
public int getFatherInt() { | ||
return fatherInt; | ||
} | ||
|
||
public void setFatherInt(int fatherInt) { | ||
this.fatherInt = fatherInt; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
demo/src/main/java/dev/alexengrig/metter/demo/inheritance/GrandsonDomain.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,39 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.inheritance; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
|
||
@GetterSupplier | ||
@SetterSupplier | ||
public class GrandsonDomain extends SonDomain { | ||
private int grandsonInt; | ||
|
||
public GrandsonDomain(int fatherInt, int sonInt, int grandsonInt) { | ||
super(fatherInt, sonInt); | ||
this.grandsonInt = grandsonInt; | ||
} | ||
|
||
public int getGrandsonInt() { | ||
return grandsonInt; | ||
} | ||
|
||
public void setGrandsonInt(int grandsonInt) { | ||
this.grandsonInt = grandsonInt; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
demo/src/main/java/dev/alexengrig/metter/demo/inheritance/SonDomain.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,39 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.inheritance; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
|
||
@GetterSupplier | ||
@SetterSupplier | ||
public class SonDomain extends FatherDomain { | ||
private int sonInt; | ||
|
||
public SonDomain(int fatherInt, int sonInt) { | ||
super(fatherInt); | ||
this.sonInt = sonInt; | ||
} | ||
|
||
public int getSonInt() { | ||
return sonInt; | ||
} | ||
|
||
public void setSonInt(int sonInt) { | ||
this.sonInt = sonInt; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
demo/src/main/java/dev/alexengrig/metter/demo/lombokdata/InheritedLombokDataDomain.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,35 @@ | ||
/* | ||
* Copyright 2020-2021 Alexengrig Dev. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package dev.alexengrig.metter.demo.lombokdata; | ||
|
||
import dev.alexengrig.metter.annotation.GetterSupplier; | ||
import dev.alexengrig.metter.annotation.SetterSupplier; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@GetterSupplier | ||
@SetterSupplier | ||
@EqualsAndHashCode(callSuper = true) | ||
public class InheritedLombokDataDomain extends LombokDataDomain { | ||
private long longer; | ||
|
||
public InheritedLombokDataDomain(int integer, boolean bool, long longer) { | ||
super(integer, bool); | ||
this.longer = longer; | ||
} | ||
} |
Oops, something went wrong.