Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ target/
.classpath
.project
.settings
.idea/
38 changes: 0 additions & 38 deletions jpatterns.iml

This file was deleted.

2,144 changes: 0 additions & 2,144 deletions jpatterns.iws

This file was deleted.

196 changes: 97 additions & 99 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,99 +1,97 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<groupId>org.jpatterns</groupId>
<artifactId>jpatterns</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>Java Design Pattern Annotations</name>
<description>
Design Patterns are typically encoded into Java code in an ad-hoc fashion.
They are either embedded into the names of the classes or written into the
Javadocs.
Unfortunately it is impossible to accurately determine a pattern based
solely on the
class structure without knowing the intent of the code author.

JPatterns is a collection of annotations that make it easy to communicate
the use
of (Design)Patterns within your code to your fellow developers and your
future self.
</description>
<url>http://jpatterns.org</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://github.com/jexp/jpatterns</url>
<connection>git://github.com/jexp/jpatterns.git</connection>
<developerConnection>git@github.com:jexp/jpatterns.git</developerConnection>
</scm>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
</dependencies>


</project>
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<groupId>org.jpatterns</groupId>
<artifactId>jpatterns</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<name>Java Design Pattern Annotations</name>
<description>
Design Patterns are typically encoded into Java code in an ad-hoc
fashion. They are either embedded into the names of the classes or
written into the Javadocs. Unfortunately it is impossible to accurately
determine a pattern based solely on the class structure without knowing
the intent of the code author.

JPatterns is a collection of annotations that make it easy to
communicate the use of (Design)Patterns within your code to your fellow
developers and your future self.
</description>
<url>http://jpatterns.org</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://github.com/jexp/jpatterns</url>
<connection>git://github.com/jexp/jpatterns.git</connection>
<developerConnection>git@github.com:jexp/jpatterns.git
</developerConnection>
</scm>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
17 changes: 11 additions & 6 deletions src/main/java/org/jpatterns/core/DesignPattern.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package org.jpatterns.core;

import java.lang.annotation.*;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* @author Michael Hunger
Expand All @@ -11,13 +16,13 @@
@Documented
@Inherited
public @interface DesignPattern {
Source source() default Source.GoF;
Source source() default Source.GoF;

Type type();
Type type();

String[] urls() default {};
String[] urls() default {};

Refactoring[] refactorings() default {};
Refactoring[] refactorings() default {};

Class[] related() default {};
Class[] related() default {};
}
2 changes: 1 addition & 1 deletion src/main/java/org/jpatterns/core/Refactoring.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* @since 2010-08-08
*/
public enum Refactoring {
ExtractMethodObject, ExtractParameterObject
ExtractMethodObject, ExtractParameterObject
}
2 changes: 1 addition & 1 deletion src/main/java/org/jpatterns/core/Source.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* @since 2010-07-14
*/
public enum Source {
GoF, POSA, PoEAA, PLoPD3, CoreJ2EE, Other, Hophe
GoF, POSA, PoEAA, PLoPD3, CoreJ2EE, Other, Hophe
}
2 changes: 1 addition & 1 deletion src/main/java/org/jpatterns/core/Type.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* @since 2010-07-14
*/
public enum Type {
CREATIONAL, STRUCTURAL, BEHAVIORAL, USER_INTERFACE, MESSAGING, ENTERPRISE
CREATIONAL, STRUCTURAL, BEHAVIORAL, USER_INTERFACE, MESSAGING, ENTERPRISE
}
23 changes: 14 additions & 9 deletions src/main/java/org/jpatterns/doc/PatternComment.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package org.jpatterns.doc;

import java.lang.annotation.*;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* @author Heinz Kabutz
Expand All @@ -9,16 +14,16 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({
ElementType.TYPE,
ElementType.CONSTRUCTOR,
ElementType.FIELD,
ElementType.LOCAL_VARIABLE,
ElementType.METHOD,
ElementType.PARAMETER
})
ElementType.TYPE,
ElementType.CONSTRUCTOR,
ElementType.FIELD,
ElementType.LOCAL_VARIABLE,
ElementType.METHOD,
ElementType.PARAMETER
})
@Documented
@Inherited
@Deprecated
public @interface PatternComment {
String value();
String value();
}
23 changes: 14 additions & 9 deletions src/main/java/org/jpatterns/doc/PatternParticipants.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package org.jpatterns.doc;

import java.lang.annotation.*;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* @author Heinz Kabutz
Expand All @@ -9,16 +14,16 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({
ElementType.TYPE,
ElementType.CONSTRUCTOR,
ElementType.FIELD,
ElementType.LOCAL_VARIABLE,
ElementType.METHOD,
ElementType.PARAMETER
})
ElementType.TYPE,
ElementType.CONSTRUCTOR,
ElementType.FIELD,
ElementType.LOCAL_VARIABLE,
ElementType.METHOD,
ElementType.PARAMETER
})
@Documented
@Inherited
@Deprecated
public @interface PatternParticipants {
Class[] value();
Class[] value();
}
Loading