Skip to content

Commit

Permalink
add annotations sub module #9
Browse files Browse the repository at this point in the history
  • Loading branch information
SingingBush committed Jan 5, 2024
1 parent 15d0041 commit dabffaf
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 1 deletion.
15 changes: 15 additions & 0 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>sdlang</artifactId>
<groupId>com.singingbush</groupId>
<version>2.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>sdl-annotations</artifactId>


</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.singingbush.sdl.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
public @interface Attribute {

String value() default "";

String namespace() default "";

boolean required() default false;

String defaultValue() default "";
}
15 changes: 15 additions & 0 deletions annotations/src/main/java/com/singingbush/sdl/annotations/Tag.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.singingbush.sdl.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Tag {

String value() default "";

String namespace() default "";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.singingbush.sdl.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
public @interface Value {
}
15 changes: 14 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@

<groupId>com.singingbush</groupId>
<artifactId>sdlang</artifactId>
<version>2.2.0</version>
<version>2.1.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>SDLang</name>
<description>Support for SDLang (Simple Declarative Language)</description>
<url>https://github.com/sdlang-dev/SDL</url>
<inceptionYear>2011</inceptionYear>

<modules>
<module>annotations</module>
</modules>

<licenses>
<license>
<name>GNU Lesser General Public License, Version 2.1</name>
Expand Down Expand Up @@ -92,6 +97,14 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.singingbush</groupId>
<artifactId>sdl-annotations</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>

</dependencies>

<build>
Expand Down

0 comments on commit dabffaf

Please sign in to comment.