-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mohamed-ashraf-bayor/feature/JIS01-jisel-v…
…ersion1 Feature/jis01 jisel version1
- Loading branch information
Showing
24 changed files
with
2,268 additions
and
195 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
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 @@ | ||
/** | ||
* Copyright (c) 2022 Mohamed Ashraf Bayor | ||
* <p> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* <p> | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* <p> | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
module jisel { | ||
exports org.jisel; | ||
requires java.compiler; | ||
requires java.logging; | ||
requires com.google.auto.service; | ||
} |
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 |
---|---|---|
@@ -1,12 +1,74 @@ | ||
/** | ||
* Copyright (c) 2022 Mohamed Ashraf Bayor | ||
* <p> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* <p> | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* <p> | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package org.jisel; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Repeatable; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
import static org.jisel.generator.StringGenerator.EMPTY_STRING; | ||
|
||
/** | ||
* Annotation to be applied on top of a class, an interface or a record which is implementing or extending a sealed interface generated by Jisel.<br><br> | ||
* All sealed interfaces generated by Jisel follow the naming convention: <b>Sealed<ProfileName><LargeInterfaceSimpleName></b><br> | ||
* See @{@link AddToProfiles} attributes documentation.<br><br> | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target({ElementType.TYPE}) | ||
@Repeatable(AddToProfiles.AddToProfilezz.class) | ||
public @interface AddToProfiles { | ||
String[] value(); | ||
|
||
/** | ||
* <i>Not Required</i> - specifies an array containing the names of any of the profiles used with the @{@link SealForProfile} annotations in the large interface definition. | ||
* Each one of the profiles names corresponds to the <b><ProfileName></b> from the sealed interfaces naming convention.<br> | ||
* If not provided or empty, the annotated class, interface or record will be added to the permits list of the generated parent sealed interface.<br> | ||
* Also, each one of the provided profiles names MUST be one of the profiles defined in the large interface definition using @SealForProfile. If not, | ||
* the specified profile will be ignored and an informational message regarding provided incorrect profiles will be printed during the compilation.<br> | ||
* | ||
* @return an array of the profiles names | ||
*/ | ||
String[] profiles() default EMPTY_STRING; | ||
|
||
/** | ||
* <i>Required</i> - MUST be the Fully Qualified Name of the large interface. That would be the <b><LargeInterfaceSimpleName></b> as seen | ||
* in the sealed interface name convention, preceded by the package name.<br> | ||
* | ||
* @return the large interface fully qualified name | ||
*/ | ||
String largeInterface(); | ||
|
||
/** | ||
* Internal annotation allowing @{@link AddToProfiles} to be repeatable | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target(ElementType.TYPE) | ||
@interface AddToProfilezz { | ||
/** | ||
* array attribute allowing @{@link AddToProfiles} to be repeatable | ||
* | ||
* @return array of @AddToProfiles instances | ||
*/ | ||
AddToProfiles[] value(); | ||
} | ||
} |
Oops, something went wrong.