diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 7c4934a..d2235a3 100755 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,7 +1,7 @@ - - - - - - + + + + + + diff --git a/.idea/libraries/ant_1_7_0.xml b/.idea/libraries/ant_1_7_0.xml index 417a6bc..7b1000a 100755 --- a/.idea/libraries/ant_1_7_0.xml +++ b/.idea/libraries/ant_1_7_0.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/ant_launcher_1_7_0.xml b/.idea/libraries/ant_launcher_1_7_0.xml index fd07a13..655865d 100755 --- a/.idea/libraries/ant_launcher_1_7_0.xml +++ b/.idea/libraries/ant_launcher_1_7_0.xml @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/asm_3_2.xml b/.idea/libraries/asm_3_2.xml index ec783db..6ae7d15 100755 --- a/.idea/libraries/asm_3_2.xml +++ b/.idea/libraries/asm_3_2.xml @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/asm_tree_3_0.xml b/.idea/libraries/asm_tree_3_0.xml index 3b94439..958bde1 100755 --- a/.idea/libraries/asm_tree_3_0.xml +++ b/.idea/libraries/asm_tree_3_0.xml @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/cglib_nodep_2_2.xml b/.idea/libraries/cglib_nodep_2_2.xml index e050dad..35b40ac 100755 --- a/.idea/libraries/cglib_nodep_2_2.xml +++ b/.idea/libraries/cglib_nodep_2_2.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/cobertura_1_9_3.xml b/.idea/libraries/cobertura_1_9_3.xml index 676186a..4962299 100755 --- a/.idea/libraries/cobertura_1_9_3.xml +++ b/.idea/libraries/cobertura_1_9_3.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/gentyref_1_1_0.xml b/.idea/libraries/gentyref_1_1_0.xml index 1df8a9d..738491a 100755 --- a/.idea/libraries/gentyref_1_1_0.xml +++ b/.idea/libraries/gentyref_1_1_0.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/guava_11_0_1.xml b/.idea/libraries/guava_11_0_1.xml index 80c981e..57b89c7 100755 --- a/.idea/libraries/guava_11_0_1.xml +++ b/.idea/libraries/guava_11_0_1.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/hamcrest_core_1_1.xml b/.idea/libraries/hamcrest_core_1_1.xml index 91a285c..afb1fd9 100755 --- a/.idea/libraries/hamcrest_core_1_1.xml +++ b/.idea/libraries/hamcrest_core_1_1.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/jsr305_1_3_9.xml b/.idea/libraries/jsr305_1_3_9.xml index 9a28217..25cc6d7 100755 --- a/.idea/libraries/jsr305_1_3_9.xml +++ b/.idea/libraries/jsr305_1_3_9.xml @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/junit_dep_4_10.xml b/.idea/libraries/junit_dep_4_10.xml index 54e1b8e..52e5f5b 100755 --- a/.idea/libraries/junit_dep_4_10.xml +++ b/.idea/libraries/junit_dep_4_10.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/log4j_1_2_9.xml b/.idea/libraries/log4j_1_2_9.xml index c525079..d4447be 100755 --- a/.idea/libraries/log4j_1_2_9.xml +++ b/.idea/libraries/log4j_1_2_9.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/mockachino_0_6_0.xml b/.idea/libraries/mockachino_0_6_0.xml index 2dd97a1..cfbd665 100755 --- a/.idea/libraries/mockachino_0_6_0.xml +++ b/.idea/libraries/mockachino_0_6_0.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/objenesis_1_2.xml b/.idea/libraries/objenesis_1_2.xml index 5c1c34e..c3a453f 100755 --- a/.idea/libraries/objenesis_1_2.xml +++ b/.idea/libraries/objenesis_1_2.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/oro_2_0_8.xml b/.idea/libraries/oro_2_0_8.xml index bd2fc74..67ce918 100755 --- a/.idea/libraries/oro_2_0_8.xml +++ b/.idea/libraries/oro_2_0_8.xml @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7a9fa02..092abae 100755 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,31 +1,15 @@ - - - - - - - - http://www.w3.org/1999/xhtml - - - - - - - - - - 1.7 - - - - - - - - - + + + + + + + + http://www.w3.org/1999/xhtml + + + + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml index 4782635..587d77f 100755 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/Fettle.iml b/Fettle.iml index 3137d75..cb8bb89 100755 --- a/Fettle.iml +++ b/Fettle.iml @@ -1,32 +1,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.gradle b/build.gradle index c0d00c6..4a8ad88 100755 --- a/build.gradle +++ b/build.gradle @@ -1,142 +1,142 @@ -apply plugin: 'java' -apply plugin: 'checkstyle' -apply plugin: 'maven' -apply plugin: 'signing' - -sourceCompatibility = 1.6 - -group = 'se.fearless' -version = '0.8.1' - -defaultTasks 'build' - -repositories { - mavenCentral() -} - -dependencies { - testCompile group: 'junit', name: 'junit-dep', version: '4.10' - testCompile group: 'se.mockachino', name: 'mockachino', version: '0.6.0' - testRuntime 'net.sourceforge.cobertura:cobertura:1.9.3' - compile group: 'com.google.guava', name: 'guava', version: '11.0.1' -} - -task gwtJar(type: Jar, dependsOn: classes) { - classifier = 'gwt' - from sourceSets.main.getOutput().classesDir - into('se/fearless/fettle/super') { - from sourceSets.main.allJava - } - into('se/fearless/fettle') { - from sourceSets.main.resources - } -} - -jar { - exclude("**/*.xml") -} - -checkstyleMain { - doLast { - ant.xslt(in: "$buildDir/reports/checkstyle/main.xml", - style:"config/checkstyle/checkstyle.xsl", - out:"$buildDir/reports/checkstyle/checkstyle.html" - ) - } -} - -checkstyleTest { - ignoreFailures = true -} - -task checkstyleReport << { - if (file("$buildDir/reports/checkstyle/${checkType}.xml").exists()) { - - } -} - -// custom tasks for creating source jar -task sourcesJar(type: Jar, dependsOn:classes) { - classifier = 'sources' - from sourceSets.main.allSource -} -// custom tasks for creating javadoc jar -task javadocJar(type: Jar, dependsOn:javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives jar - archives sourcesJar - archives javadocJar -} - -signing { - sign configurations.archives -} - -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signPom(deployment) } - - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: sonatypeUsername, password: sonatypePassword) - } - - pom.project { - name 'Fettle' - packaging 'jar' - description 'Fettle is a state machine framework for java' - url 'http://http://thehiflyer.github.com/Fettle/' - - scm { - url 'scm:git@github.com:thehiflyer/Fettle.git' - connection 'scm:git@github.com:thehiflyer/Fettle.git' - developerConnection 'scm:git@github.com:thehiflyer/Fettle.git' - } - - licenses { - license { - name 'MIT License' - url 'http://www.opensource.org/licenses/mit-license.php' - distribution 'repo' - } - } - - developers { - developer { - id 'thehiflyer' - name 'Per Malmén' - } - } - } - - //mess with the generated pom to set the 'packaging' tag - pom.withXml { XmlProvider xmlProvider -> - def xml = xmlProvider.asString() - def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes)) - - pomXml.version[0] + { packaging('jar') } - - def newXml = new StringWriter() - def printer = new XmlNodePrinter(new PrintWriter(newXml)) - printer.preserveWhitespace = true - printer.print(pomXml) - xml.setLength(0) - xml.append(newXml.toString()) - } - } - } -} - -//buildscript { -// using a variable to make wiki look cleaner -// def githubBase = 'https://raw.github.com/valkolovos/gradle_cobertura/master/ivy' -// apply from: "${githubBase}/gradle_cobertura/gradle_cobertura/1.0-rc4/coberturainit.gradle" -//} - -task wrapper(type: Wrapper) { - gradleVersion = '1.1' +apply plugin: 'java' +apply plugin: 'checkstyle' +apply plugin: 'maven' +apply plugin: 'signing' + +sourceCompatibility = 1.6 + +group = 'se.fearless' +version = '0.8.1' + +defaultTasks 'build' + +repositories { + mavenCentral() +} + +dependencies { + testCompile group: 'junit', name: 'junit-dep', version: '4.10' + testCompile group: 'se.mockachino', name: 'mockachino', version: '0.6.0' + testRuntime 'net.sourceforge.cobertura:cobertura:1.9.3' + compile group: 'com.google.guava', name: 'guava', version: '11.0.1' +} + +task gwtJar(type: Jar, dependsOn: classes) { + classifier = 'gwt' + from sourceSets.main.getOutput().classesDir + into('se/fearless/fettle/super') { + from sourceSets.main.allJava + } + into('se/fearless/fettle') { + from sourceSets.main.resources + } +} + +jar { + exclude("**/*.xml") +} + +checkstyleMain { + doLast { + ant.xslt(in: "$buildDir/reports/checkstyle/main.xml", + style:"config/checkstyle/checkstyle.xsl", + out:"$buildDir/reports/checkstyle/checkstyle.html" + ) + } +} + +checkstyleTest { + ignoreFailures = true +} + +task checkstyleReport << { + if (file("$buildDir/reports/checkstyle/${checkType}.xml").exists()) { + + } +} + +// custom tasks for creating source jar +task sourcesJar(type: Jar, dependsOn:classes) { + classifier = 'sources' + from sourceSets.main.allSource +} +// custom tasks for creating javadoc jar +task javadocJar(type: Jar, dependsOn:javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives jar + archives sourcesJar + archives javadocJar +} + +signing { + sign configurations.archives +} + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + + pom.project { + name 'Fettle' + packaging 'jar' + description 'Fettle is a state machine framework for java' + url 'http://http://thehiflyer.github.com/Fettle/' + + scm { + url 'scm:git@github.com:thehiflyer/Fettle.git' + connection 'scm:git@github.com:thehiflyer/Fettle.git' + developerConnection 'scm:git@github.com:thehiflyer/Fettle.git' + } + + licenses { + license { + name 'MIT License' + url 'http://www.opensource.org/licenses/mit-license.php' + distribution 'repo' + } + } + + developers { + developer { + id 'thehiflyer' + name 'Per Malmén' + } + } + } + + //mess with the generated pom to set the 'packaging' tag + pom.withXml { XmlProvider xmlProvider -> + def xml = xmlProvider.asString() + def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes)) + + pomXml.version[0] + { packaging('jar') } + + def newXml = new StringWriter() + def printer = new XmlNodePrinter(new PrintWriter(newXml)) + printer.preserveWhitespace = true + printer.print(pomXml) + xml.setLength(0) + xml.append(newXml.toString()) + } + } + } +} + +//buildscript { +// using a variable to make wiki look cleaner +// def githubBase = 'https://raw.github.com/valkolovos/gradle_cobertura/master/ivy' +// apply from: "${githubBase}/gradle_cobertura/gradle_cobertura/1.0-rc4/coberturainit.gradle" +//} + +task wrapper(type: Wrapper) { + gradleVersion = '1.1' } \ No newline at end of file diff --git a/src/main/resources/super/java/util/concurrent/locks/Lock.java b/src/main/resources/super/java/util/concurrent/locks/Lock.java new file mode 100644 index 0000000..01ea1c8 --- /dev/null +++ b/src/main/resources/super/java/util/concurrent/locks/Lock.java @@ -0,0 +1,6 @@ +package java.util.concurrent.locks; + +public interface Lock { + void lock(); + void unlock(); +} diff --git a/src/main/resources/super/java/util/concurrent/locks/ReentrantLock.java b/src/main/resources/super/java/util/concurrent/locks/ReentrantLock.java new file mode 100644 index 0000000..a8b698e --- /dev/null +++ b/src/main/resources/super/java/util/concurrent/locks/ReentrantLock.java @@ -0,0 +1,13 @@ +package java.util.concurrent.locks; + + +public class ReentrantLock implements Lock { + + @Override + public void lock() { + } + + @Override + public void unlock() { + } +}