diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 95ff090..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1,17 +0,0 @@
-# Normalize as LF in the repository, OS native locally
-* text=auto
-*.java text
-
-# Binary files that should not be modified
-*.dat binary
-*.db binary
-*.gif binary
-*.icns binary
-*.ico binary
-*.jks binary
-*.jpg binary
-*.key binary
-*.png binary
-*.ttf binary
-*.wav binary
-JavaApplicationStub binary
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 8747b69..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,81 +0,0 @@
-# Build #
-#########
-MANIFEST.MF
-dependency-reduced-pom.xml
-
-# Compiled #
-############
-bin
-build
-dist
-lib
-out
-run
-target
-*.com
-*.class
-*.dll
-*.exe
-*.o
-*.so
-
-# Databases #
-#############
-*.db
-*.sql
-*.sqlite
-
-# Packages #
-############
-*.7z
-*.dmg
-*.ear
-*.gz
-*.iso
-*.jar
-!/gradle/wrapper/gradle-wrapper.jar
-*.rar
-*.tar
-*.war
-*.zip
-
-# Repository #
-##############
-.git
-
-# Logging #
-###########
-/logs
-*.log
-
-# Misc #
-########
-*.bak
-*.tmp
-
-# System #
-##########
-.DS_Store
-ehthumbs.db
-Thumbs.db
-
-# Project #
-###########
-.buildpath
-.classpath
-.cproject
-.externalToolBuilders
-.gradle
-.idea
-.project
-.settings
-nbproject
-atlassian-ide-plugin.xml
-build.xml
-nb-configuration.xml
-*.iml
-*.ipr
-*.iws
-*.launch
-*.pydevproject
-
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 5fa04bb..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-# Use new Travis-CI infrastructure
-sudo: false
-
-# Source language and JDK version to use
-language: java
-jdk: oraclejdk8
-
-# Use cached Maven dependencies
-cache:
- directories:
- - $HOME/.m2
-
-# Pre-install Maven dependencies
-install: mvn dependency:go-offline
-
-# Compile and test source
-script: mvn clean -DbuildNumber=$TRAVIS_BUILD_NUMBER -DciSystem=travis -Dcommit=${TRAVIS_COMMIT:0:7}
-
-# Fetch resources, run deployment goal/task, and generate Javadocs and reports
-after_success:
- # Get files for use with build, namely the custom Maven settings.xml and scripts
- - "git clone https://github.com/flow/travis-ci-resources.git $HOME/build/flow/travis"
- # DEVELOP: Check if commit is not a pull request, if repo is official, if branch is not master; then deploy artifacts
- - "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/plugins ]] && [[ $TRAVIS_BRANCH == develop ]] && mvn javadoc:jar source:jar deploy --settings $HOME/build/flow/travis/settings.xml"
- # RELEASE: Check if commit is not a pull request, if repo is official, if branch is master; then run deployment script
- - "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/plugins ]] && [[ $TRAVIS_BRANCH == master ]] && $HOME/build/flow/travis/deploy.sh && $HOME/build/flow/travis/gh-pages.sh"
- # Generate Javadocs and report for Coveralls.io
- - "mvn javadoc:javadoc cobertura:cobertura coveralls:report -DserviceJobId=$TRAVIS_JOB_ID"
-
-# RELEASE: Deploy JARs to GitHub Releases
-
-deploy:
- provider: releases
- api-key: $GITHUB_TOKEN
- file_glob: true
- file: target/flow-plugins-*.jar
- skip_cleanup: true
- on:
- branch: master
-
-# Notification services
-notifications:
- # Disable build status email notifications, until the issue with forks is fixed
- email: false
- webhooks:
- # Send build information and status to Notifico
- - http://n.tkte.ch/h/2048/4S4rO20aCRMlaI86VpW3V0RC
-
-# Environmental system variables
-env:
- global:
- # Make the log output cleaner
- - TERM=dumb
- # Super secure, encrypted variables! Ssssh!
- - secure: "DSON8OMdSIreTxaiot6nC4SFh7QnRJq42u8mB8JaZX5Okb2igXOyKjmkzEfiKjDgRxLniG7du+4+Uvq6daLclN7NBgiREEKIbbFFfVAFB8xz+G197maWTBxA1YE+RRdXzv4EpDXwsUMyi1+c+jH8Je1O6tWd2iyt0wq+zae2pYk="
- - secure: "l4eQqSD5U182HYoDFQq+mL3CGvw/SFBcOpNSdNt+83YmALsKf16lGkH/SduEOcfEjSadAK/SR/m05U7vtoMK0MsmpI0boLiKuMVZDsNNEDXW0j1LsIhb+xYo+p2r1XpQnzVycUoKrqzfMfRxyWw/CpyVqU1n14QUndvxeVGcQc0="
- - secure: "JkjM6NmtoHkclZ3S9bGkHCDdOkWgrhKpX/BCCn2MO1pQkqy7tnT+H5SRqtn2WnnI1EjrymLj8v7YsXaqUMAWcJ1YTboBlqUONFyF0M9ZPqKeRrYxacCxRbGCUtLkJJInr50mw0FK3Z791Vu2SlttnNfxnuiXSx3lTwbKrf3Dl98="
- - secure: "YldDYrOgqEPLxaJ80R6cNJ0q7x3vDBusdWYsHdSIUwcahPGXW8vAxvq7XE04gC1Z5iLh9jsFLasj2ipNo7TupCLEnzjUSbABAI6foaXQGpvzlCZeDnZwvDOZDDIQc4jNIz1VYdTVA/reX/5tBuur57I5oO5HaVl+BIkQhB7GY5Y="
diff --git a/HEADER.txt b/HEADER.txt
deleted file mode 100644
index 6218055..0000000
--- a/HEADER.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-This file is part of ${project}, licensed under the MIT License (MIT).
-
-Copyright (c) ${year} ${name} <${url}/>
-
-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:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-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.
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 1a63677..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-The MIT License (MIT)
-
-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:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-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.
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 2cdb4bb..0000000
--- a/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-# Flow Plugins [][License] [][Donate] [](https://travis-ci.org/flow/plugins) [](https://coveralls.io/r/flow/plugins)
-
-Extensible and modular library for creating Java-based plugins that are loaded separate from the main codebase at runtime.
-
-## Getting Started
-* [Examples and code snippets](https://github.com/flow/examples/tree/master/plugins)
-* [Official documentation](#documentation)
-* [IRC support chat](http://kiwiirc.com/client/irc.esper.net/flow)
-* [Issues tracker](https://github.com/flow/plugins/issues)
-
-## Source Code
-The latest and greatest source can be found here on [GitHub](https://github.com/flow/plugins). If you are using Git, use this command to clone the project:
-
- git clone git://github.com/flow/plugins.git
-
-Or download the latest [development archive](https://github.com/flow/caustic/archive/develop.zip) or the latest [stable archive](https://github.com/flow/caustic/archive/master.zip).
-
-## Dependencies
-We love open-source libraries! This project uses are few of them to make things easier. If you aren't using Maven or Gradle, you'll need these!
-* [com.flowpowered:flow-commons](https://oss.sonatype.org/#nexus-search;gav~com.flowpowered~flow-commons~~~)
-* [com.flowpowered:flow-persistence](https://oss.sonatype.org/#nexus-search;gav~com.flowpowered~flow-persistence~~~)
-* [com.flowpowered:reflections](https://oss.sonatype.org/#nexus-search;gav~com.flowpowered~reflections~~~)
-
-## Building from Source
-This project can be built with the _latest_ [Java Development Kit](http://oracle.com/technetwork/java/javase/downloads) and [Maven](https://maven.apache.org/) or [Gradle](https://www.gradle.org/). Maven and Gradle are used to simplify dependency management, but using either of them is optional.
-
-For Maven, the command `mvn clean package` will build the project and will put the compiled JAR in `target`, and `mvn clean install` will copy it to your local Maven repository.
-
-For Gradle, the command `gradlew` will build the project and will put the compiled JAR in `~/build/distributions`, and `gradlew install` will copy it to your local Maven repository.
-
-## Contributing
-Are you a talented programmer looking to contribute some code? We'd love the help!
-
-* Open a pull request with your changes, following our [guidelines and coding standards](CONTRIBUTING.md).
-* Please follow the above guidelines for your pull request(s) accepted.
-* For help setting up the project, keep reading!
-
-Love the project? Feel free to [donate] to help continue development! Flow projects are open-source and powered by community members, like yourself. Without you, we wouldn't be here today!
-
-Don't forget to watch and star our repo to keep up-to-date with the latest Flow development!
-
-## Usage
-If you're using [Maven](https://maven.apache.org/download.html) to manage project dependencies, simply include the following in your `pom.xml` file:
-
-
- com.flowpowered
- flow-plugins
- 1.0.0
-
-
-If you're using [Gradle](https://www.gradle.org/) to manage project dependencies, simply include the following in your `build.gradle` file:
-
- repositories {
- mavenCentral()
- }
- dependencies {
- compile 'com.flowpowered:flow-plugins:1.0.0'
- }
-
-If you plan on using snapshots and do not already have the snapshot repo in your repository list, you will need to add this as well:
-
- https://oss.sonatype.org/content/groups/public/
-
-If you'd prefer to manually import the latest .jar file, you can get it [here](https://github.com/flow/plugins/releases).
-
-## Documentation
-Want to get friendly with the project and put it to good use? Check out the latest [Javadocs](https://flowpowered.com/plugins).
-
-To generate Javadocs with Maven, use the `mvn javadoc:javadoc` command. To view the Javadocs simply go to `target/site/apidocs/` and open `index.html` in a web browser.
-
-To generate Javadocs with Gradle, use the `gradlew javadoc` command. To view the Javadocs simply go to `build/docs/javadoc/` and open `index.html` in a web browser.
-
-## Version Control
-We've adopted the [git flow branching model](http://nvie.com/posts/a-successful-git-branching-model/) in our projects. The creators of git flow released a [short intro video](http://vimeo.com/16018419) to explain the model.
-
-The `master` branch is production-ready and contains the latest tagged releases. Before a release is made, it is stagged in `release/x` branches before being pushed and tagged in the `master` branch. Small patches from `hotfix/x` branches are also pushed to `master`, and will always have a release version. The `develop` branch is pre-production, and is where we push `feature/x` branches for testing.
-
-## Legal Stuff
-Flow Plugins is licensed under the [MIT License][License]. Basically, you can do whatever you want as long as you include the original copyright. Please see the `LICENSE.txt` file for details.
-
-## Credits
-* [Spout](https://spout.org/) and contributors - *where we all began, and for much of the re-licensed code.*
-* All the people behind [Java](http://www.oracle.com/technetwork/java/index.html), [Maven](https://maven.apache.org/), and [Gradle](https://www.gradle.org/).
-
-[Donate]: https://flattr.com/submit/auto?user_id=spout&url=https://github.com/flow/plugins&title=Flow+Plugins&language=Java&tags=github&category=software
-[License]: https://tldrlegal.com/l/mit
diff --git a/allclasses-frame.html b/allclasses-frame.html
new file mode 100644
index 0000000..bd404c9
--- /dev/null
+++ b/allclasses-frame.html
@@ -0,0 +1,35 @@
+
+
+
+
Returns an array containing the constants of this enum type, in
+the order they are declared. This method may be used to iterate
+over the constants as follows:
+
+for (PluginState c : PluginState.values())
+ System.out.println(c);
+
+
+
Returns:
+
an array containing the constants of this enum type, in the order they are declared
Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+
Parameters:
+
name - the name of the enum constant to be returned.
+
+
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index 0a836bd..0000000
--- a/gradle.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-signing.keyId=
-signing.password=
-signing.secretKeyRingFile=
-sonatypeUsername=
-sonatypePassword=
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 667288a..0000000
Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index e17acdd..0000000
--- a/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-2.6-all.zip
diff --git a/gradlew b/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 8a0b282..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/help-doc.html b/help-doc.html
new file mode 100644
index 0000000..2e92c15
--- /dev/null
+++ b/help-doc.html
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+API Help (Flow Plugins 1.0.0 API)
+
+
+
+
+
+
+
+
+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
+
+
Overview
+
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+
+
+
Package
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+
+
Interfaces (italic)
+
Classes
+
Enums
+
Exceptions
+
Errors
+
Annotation Types
+
+
+
+
Class/Interface
+
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+
Class inheritance diagram
+
Direct Subclasses
+
All Known Subinterfaces
+
All Known Implementing Classes
+
Class/interface declaration
+
Class/interface description
+
+
+
Nested Class Summary
+
Field Summary
+
Constructor Summary
+
Method Summary
+
+
+
Field Detail
+
Constructor Detail
+
Method Detail
+
+
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+
Annotation Type
+
Each annotation type has its own separate page with the following sections:
+
+
Annotation Type declaration
+
Annotation Type description
+
Required Element Summary
+
Optional Element Summary
+
Element Detail
+
+
+
+
Enum
+
Each enum has its own separate page with the following sections:
+
+
Enum declaration
+
Enum description
+
Enum Constant Summary
+
Enum Constant Detail
+
+
+
+
Use
+
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+
+
+
Tree (Class Hierarchy)
+
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
+
+
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+
When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+
+
+
Deprecated API
+
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+
+
+
Index
+
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+
+
+
Prev/Next
+
These links take you to the next or previous class, interface, package, or related page.
+
+
+
Frames/No Frames
+
These links show and hide the HTML frames. All pages are available with or without frames.
+
+
+
All Classes
+
The All Classes link shows all classes and interfaces except non-static nested types.
+
+
+
Serialized Form
+
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+
+
diff --git a/src/main/java/com/flowpowered/plugins/Context.java b/src/main/java/com/flowpowered/plugins/Context.java
deleted file mode 100644
index 12df753..0000000
--- a/src/main/java/com/flowpowered/plugins/Context.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-/**
- * Holds a link to the {@link Plugin} but also is used to hold broader information about what holds the {@link Plugin} (e.g. an engine).
- */
-public class Context {
- private final Plugin> plugin;
-
- public Context(Plugin> plugin) {
- this.plugin = plugin;
- }
-
- @SuppressWarnings("unchecked")
- public
> P getPlugin() {
- // This is inherently unsafe
- // Checks should be done before assigning the plugin to this context to ensure that the Plugin's type parameter at least matches the current class
- return (P) plugin;
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/ContextCreator.java b/src/main/java/com/flowpowered/plugins/ContextCreator.java
deleted file mode 100644
index 48407f8..0000000
--- a/src/main/java/com/flowpowered/plugins/ContextCreator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-public interface ContextCreator {
- C createContext(Plugin plugin);
-
- public static class NoContextCreator implements ContextCreator {
- public static final NoContextCreator INSTANCE = new NoContextCreator();
- @Override
- public Context createContext(Plugin plugin) {
- return new Context(plugin);
- }
-
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/InvalidPluginException.java b/src/main/java/com/flowpowered/plugins/InvalidPluginException.java
deleted file mode 100644
index ad83fee..0000000
--- a/src/main/java/com/flowpowered/plugins/InvalidPluginException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-public class InvalidPluginException extends Exception {
- private static final long serialVersionUID = 15816838168L;
-
- public InvalidPluginException() {
- }
-
- public InvalidPluginException(String message) {
- super(message);
- }
-
- public InvalidPluginException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/Plugin.java b/src/main/java/com/flowpowered/plugins/Plugin.java
deleted file mode 100644
index 10252b2..0000000
--- a/src/main/java/com/flowpowered/plugins/Plugin.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-import org.slf4j.Logger;
-
-public abstract class Plugin {
- private String name;
- private PluginManager manager;
- private C context;
-
- public PluginManager getManager() {
- return manager;
- }
-
- public String getName() {
- return name;
- }
-
- public C getContext() {
- return context;
- }
-
- protected abstract void onEnable() throws Exception;
-
- protected abstract void onDisable() throws Exception;
-
- public void enable() throws Exception {
- manager.enable(this);
- }
-
- public void disable() throws Exception {
- manager.disable(this);
- }
-
- public Logger getLogger() {
- return manager.getLogger(this);
- }
-
- public PluginState getState() {
- return manager.getState(this);
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/PluginClassLoader.java b/src/main/java/com/flowpowered/plugins/PluginClassLoader.java
deleted file mode 100644
index 22ed110..0000000
--- a/src/main/java/com/flowpowered/plugins/PluginClassLoader.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-public class PluginClassLoader extends URLClassLoader {
- private final Map> classes = new HashMap<>();
-
- public PluginClassLoader(final ClassLoader parent) {
- super(new URL[0], parent);
- }
-
- @Override
- public void addURL(URL url) {
- super.addURL(url);
- }
-
- @Override
- protected Class> findClass(String name) throws ClassNotFoundException {
- Class> result = classes.get(name);
- if (result != null) {
- return result;
- }
- return super.findClass(name);
- }
-
- public Class> defineClass(byte[] clazz) {
- return defineClass(null, clazz, 0, clazz.length);
- }
-
- /**
- * Returns a set of cached classes' names
- *
- * @return set of class names
- */
- public Set getClassNames() {
- return Collections.unmodifiableSet(classes.keySet());
- }
-
- /**
- * Returns a set of cached classes
- *
- * @return set of classes
- */
- public Collection> getClasses() {
- return Collections.unmodifiableCollection(classes.values());
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/PluginLoader.java b/src/main/java/com/flowpowered/plugins/PluginLoader.java
deleted file mode 100644
index 817d1e3..0000000
--- a/src/main/java/com/flowpowered/plugins/PluginLoader.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-import java.lang.reflect.Field;
-import java.util.Map;
-
-public abstract class PluginLoader {
- private static final Field nameField = PluginLoader.getFieldSilent(Plugin.class, "name");
- private static final Field managerField = PluginLoader.getFieldSilent(Plugin.class, "manager");
- private static final Field contextField = PluginLoader.getFieldSilent(Plugin.class, "context");
- private final ContextCreator contextCreator;
-
- public PluginLoader(ContextCreator contextCreator) {
- this.contextCreator = contextCreator;
- }
-
- public abstract Plugin load(PluginManager manager, String pluginName) throws InvalidPluginException;
-
- public abstract Map> loadAll(PluginManager manager);
-
- protected Plugin init(Plugin plugin, String name, PluginManager manager) {
- setField(nameField, plugin, name);
- setField(managerField, plugin, manager);
- setField(contextField, plugin, createContext(plugin));
- return plugin;
- }
-
- public C createContext(Plugin plugin) {
- return contextCreator.createContext(plugin);
- }
-
- public static Field getFieldSilent(Class> clazz, String name) {
- try {
- return clazz.getDeclaredField(name);
- } catch (NoSuchFieldException | SecurityException ex) {
- throw new IllegalStateException(ex);
- }
- }
-
- public static void setField(Field f, Object instance, Object value) {
- try {
- f.setAccessible(true);
- f.set(instance, value);
- f.setAccessible(false);
- } catch (IllegalAccessException | IllegalArgumentException ex) {
- throw new IllegalStateException(ex);
- }
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/PluginLoggerFactory.java b/src/main/java/com/flowpowered/plugins/PluginLoggerFactory.java
deleted file mode 100644
index b65c9c0..0000000
--- a/src/main/java/com/flowpowered/plugins/PluginLoggerFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-import org.slf4j.Logger;
-
-public interface PluginLoggerFactory {
- Logger getLogger(String pluginName);
-}
diff --git a/src/main/java/com/flowpowered/plugins/PluginManager.java b/src/main/java/com/flowpowered/plugins/PluginManager.java
deleted file mode 100644
index 75096e1..0000000
--- a/src/main/java/com/flowpowered/plugins/PluginManager.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PluginManager {
- private final List> loaders = new LinkedList<>(); // TODO: Make this a set and make PluginLoaders hashset/map compatible?
- private final Map> plugins = new HashMap<>();
- private final Map, PluginState> states = new HashMap<>();
- private final Logger logger;
- private final PluginLoggerFactory logFactory;
-
- public PluginManager(Logger logger, PluginLoggerFactory factory) {
- this.logger = logger;
- this.logFactory = factory;
- }
-
- public PluginManager(Logger logger) {
- this(logger, defaultPluginLoggerFactory(logger));
- }
-
- public void enable(Plugin plugin) throws Exception {
- if (plugin.getManager() != this) {
- throw new IllegalArgumentException("Not our plugin");
- }
- // TODO: thread safety
- if (states.get(plugin) != PluginState.DISABLED) {
- // TODO: don't fail silently
- return;
- }
- states.put(plugin, PluginState.ENABLING);
- try {
- plugin.onEnable();
- states.put(plugin, PluginState.ENABLED);
- } catch (Exception e) {
- states.put(plugin, PluginState.DISABLED); // TODO: sure? Maybe add state FAILED ?
- throw e;
- }
- }
-
- public void disable(Plugin plugin) throws Exception {
- if (plugin.getManager() != this) {
- throw new IllegalArgumentException("Not our plugin");
- }
- // TODO: thread safety
- if (states.get(plugin) != PluginState.ENABLED) {
- // TODO: don't fail silently
- return;
- }
- states.put(plugin, PluginState.DISABLING);
- try {
- plugin.onDisable();
- states.put(plugin, PluginState.DISABLED);
- } catch (Exception e) {
- states.put(plugin, PluginState.DISABLED); // TODO: Now it's state is what? DISABLED ? It failed to disable... add FAILED state maybe?
- throw e;
- }
- }
-
- protected void addLoader(PluginLoader loader) {
- loaders.add(loader);
- /* TODO: Don't load all of them like this:
- * - this overrides existing ones with the same name
- * - this loads more than needed, should be more lazy
- * - this scans for them only once and never checks again
- */
- Map> all = loader.loadAll(this);
- for (Entry> e : all.entrySet()) {
- Plugin plugin = e.getValue();
- plugins.put(e.getKey(), plugin);
- states.put(plugin, PluginState.DISABLED);
- }
- }
-
- public Logger getLogger(Plugin plugin) {
- return logFactory.getLogger(plugin.getName());
- }
-
- public Plugin getPlugin(String name) {
- return plugins.get(name);
- }
-
- public PluginState getState(Plugin plugin) {
- return states.get(plugin);
- }
-
- public Collection> getPlugins() {
- return Collections.unmodifiableCollection(plugins.values());
- }
-
- protected static PluginLoggerFactory defaultPluginLoggerFactory(Logger logger) {
- final String prefix = logger.getName() + ".";
- return new PluginLoggerFactory() {
- @Override
- public Logger getLogger(String pluginName) {
- return LoggerFactory.getLogger(prefix + pluginName);
- }
- };
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/PluginState.java b/src/main/java/com/flowpowered/plugins/PluginState.java
deleted file mode 100644
index 8b4c760..0000000
--- a/src/main/java/com/flowpowered/plugins/PluginState.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins;
-
-public enum PluginState {
- DISABLED, ENABLING, ENABLED, DISABLING
-}
diff --git a/src/main/java/com/flowpowered/plugins/annotated/AnnotatedPlugin.java b/src/main/java/com/flowpowered/plugins/annotated/AnnotatedPlugin.java
deleted file mode 100644
index d94e441..0000000
--- a/src/main/java/com/flowpowered/plugins/annotated/AnnotatedPlugin.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins.annotated;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import com.flowpowered.plugins.Context;
-import com.flowpowered.plugins.Plugin;
-
-public class AnnotatedPlugin extends Plugin {
- private Object annotated;
- private Method enable;
- private Method disable;
-
- @Override
- protected void onEnable() throws Exception {
- try {
- if (enable == null) return;
- enable.invoke(annotated, getContext());
- } catch (IllegalAccessException | IllegalArgumentException e) {
- throw new IllegalStateException("Got exception from reflection even though the method passed our checks", e);
- } catch (InvocationTargetException e) {
- throw new Exception("Exception in enable method", e.getCause());
- }
- }
-
- @Override
- protected void onDisable() throws Exception {
- try {
- if (disable == null) return;
- disable.invoke(annotated, getContext());
- } catch (IllegalAccessException | IllegalArgumentException e) {
- throw new IllegalStateException("Got exception from reflection even though the method passed our checks", e);
- } catch (InvocationTargetException e) {
- throw new Exception("Exception in enable method", e.getCause());
- }
- }
-
- public Object getAnnotated() {
- return annotated;
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/annotated/AnnotatedPluginLoader.java b/src/main/java/com/flowpowered/plugins/annotated/AnnotatedPluginLoader.java
deleted file mode 100644
index 11f3528..0000000
--- a/src/main/java/com/flowpowered/plugins/annotated/AnnotatedPluginLoader.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins.annotated;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.file.DirectoryStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.reflections.Reflections;
-import org.reflections.scanners.SubTypesScanner;
-import org.reflections.scanners.TypeAnnotationsScanner;
-import org.reflections.util.ConfigurationBuilder;
-
-import com.flowpowered.plugins.Context;
-import com.flowpowered.plugins.ContextCreator;
-import com.flowpowered.plugins.InvalidPluginException;
-import com.flowpowered.plugins.PluginClassLoader;
-import com.flowpowered.plugins.PluginLoader;
-import com.flowpowered.plugins.PluginManager;
-import com.flowpowered.plugins.simple.SimplePluginLoader;
-
-public class AnnotatedPluginLoader extends PluginLoader {
- private final ClassLoader cl;
- private final Path path;
- private static final Field objectField = PluginLoader.getFieldSilent(AnnotatedPlugin.class, "annotated");
- private static final Field enableField = PluginLoader.getFieldSilent(AnnotatedPlugin.class, "enable");
- private static final Field disableField = PluginLoader.getFieldSilent(AnnotatedPlugin.class, "disable");
-
- public AnnotatedPluginLoader(ContextCreator contextCreator, Path folder, ClassLoader cl) {
- super(contextCreator);
- this.cl = cl;
- this.path = folder;
- }
-
- protected Path getPath() {
- return path;
- }
-
- @Override
- public Map> loadAll(PluginManager manager) {
- return loadPath(manager, path);
- }
-
- private Map> loadPath(PluginManager manager, Path path) {
- Map> loaded = new HashMap<>();
- try {
- if (Files.isDirectory(path)) {
- for (Path localPath : Files.newDirectoryStream(path, DirectoryStreamFilter.INSTANCE)) {
- loaded.putAll(loadPath(manager, localPath));
- }
- } else if (path.toString().endsWith(".jar") || path.toString().endsWith("zip")) {
- URL url = path.toUri().toURL();
- URLClassLoader ucl = new URLClassLoader(new URL[] { url });
- for (Class> plugin : find(url, ucl)) {
- checkAndLoad(loaded, plugin, manager, new PluginClassLoader(ucl));
- }
- } else if (path.toString().endsWith(".class")) {
- InputStream in = Files.newInputStream(path);
- byte[] bytes = new byte[in.available()];
- in.read(bytes);
- PluginClassLoader pcl = new PluginClassLoader(cl);
- Class> check = pcl.defineClass(bytes);
- checkAndLoad(loaded, check, manager, pcl);
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- return loaded;
- }
-
- private void checkAndLoad(Map> loaded, Class> check, PluginManager manager, PluginClassLoader pcl) {
- Plugin ann = check.getAnnotation(Plugin.class);
- String name = ann.name();
- try {
- loaded.put(name, load(manager, ann, check, pcl));
- } catch (InvalidPluginException ex) {
- ex.printStackTrace();
- }
- }
-
- public AnnotatedPlugin load(PluginManager manager, Plugin annotation, Class> clazz, ClassLoader cl) throws InvalidPluginException {
- try {
- Object annotated = clazz.newInstance();
- AnnotatedPlugin plugin = new AnnotatedPlugin<>();
- return init(plugin, annotation.name(), manager, annotated);
- } catch (IllegalArgumentException | IllegalAccessException ex) {
- // Shouldn't happen
- throw new IllegalStateException(ex);
- } catch (InstantiationException ex) {
- throw new InvalidPluginException("Cannot instantiate object", ex);
- }
- }
-
- protected boolean validateMethod(Method method, Class extends Context> contextClass) {
- if (Modifier.isAbstract(method.getModifiers())) {
- // TODO: log
- return false;
- }
- if (!method.isAccessible()) {
- // TODO: log
- return false;
- }
- Class>[] params = method.getParameterTypes();
- if (params.length != 1) {
- // TODO: log
- return false;
- }
- // We can use the generic Context or a specific one
- // However, the parameter can never be a subclass
- if (!params[0].isAssignableFrom(contextClass)) {
- // TODO: log
- return false;
- }
- return true;
- }
-
- protected AnnotatedPlugin init(AnnotatedPlugin plugin, String name, PluginManager manager, Object annotated) throws IllegalArgumentException, IllegalAccessException {
- super.init(plugin, name, manager);
- Method enable = null;
- Method disable = null;
- outer:
- for (Class> cls = annotated.getClass(); cls != null; cls = cls.getSuperclass()) {
- for (Method m : cls.getDeclaredMethods()) {
- m.setAccessible(true);
- boolean canBeEnable = (enable == null && m.isAnnotationPresent(Enable.class));
- boolean canBeDisable = (disable == null && m.isAnnotationPresent(Disable.class));
- if (!(canBeEnable || canBeDisable)) {
- continue;
- }
- if (!validateMethod(m, plugin.getContext().getClass())) {
- continue;
- }
- if (canBeEnable) {
- enable = m;
- }
- if (canBeDisable) {
- disable = m;
- }
- if (enable != null && disable != null) {
- break outer;
- }
- }
- }
- SimplePluginLoader.setField(objectField, plugin, annotated);
- SimplePluginLoader.setField(enableField, plugin, enable);
- SimplePluginLoader.setField(disableField, plugin, disable);
- return plugin;
- }
-
- @Override
- public com.flowpowered.plugins.Plugin load(PluginManager manager, String pluginName) throws InvalidPluginException {
- // TODO: remove this
- return loadAll(manager).get(pluginName);
- }
-
- public static Set> find(URL url, ClassLoader cl) {
- Reflections ref = new Reflections(new ConfigurationBuilder().addUrls(url).addClassLoader(cl).setScanners(new TypeAnnotationsScanner(), new SubTypesScanner()));
- return ref.getTypesAnnotatedWith(Plugin.class);
- }
-
- private static class DirectoryStreamFilter implements DirectoryStream.Filter {
- private static DirectoryStreamFilter INSTANCE = new DirectoryStreamFilter();
- @Override
- public boolean accept(Path entry) throws IOException {
- return Files.isDirectory(entry) || entry.getFileName().toString().endsWith(".jar") || entry.getFileName().toString().endsWith(".zip") || entry.getFileName().toString().endsWith(".class");
- }
- }
-}
diff --git a/src/main/java/com/flowpowered/plugins/annotated/Disable.java b/src/main/java/com/flowpowered/plugins/annotated/Disable.java
deleted file mode 100644
index d15b3ce..0000000
--- a/src/main/java/com/flowpowered/plugins/annotated/Disable.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins.annotated;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Disable {
-
-}
diff --git a/src/main/java/com/flowpowered/plugins/annotated/Enable.java b/src/main/java/com/flowpowered/plugins/annotated/Enable.java
deleted file mode 100644
index f0ad5fa..0000000
--- a/src/main/java/com/flowpowered/plugins/annotated/Enable.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins.annotated;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Enable {
-
-}
diff --git a/src/main/java/com/flowpowered/plugins/annotated/Plugin.java b/src/main/java/com/flowpowered/plugins/annotated/Plugin.java
deleted file mode 100644
index 9986b4f..0000000
--- a/src/main/java/com/flowpowered/plugins/annotated/Plugin.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins.annotated;
-
-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 Plugin {
- String name();
-}
diff --git a/src/main/java/com/flowpowered/plugins/simple/SimplePluginLoader.java b/src/main/java/com/flowpowered/plugins/simple/SimplePluginLoader.java
deleted file mode 100644
index 3376ccf..0000000
--- a/src/main/java/com/flowpowered/plugins/simple/SimplePluginLoader.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * This file is part of Flow Plugins, licensed under the MIT License (MIT).
- *
- * Copyright (c) 2013 Flow Powered
- *
- * 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:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * 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 com.flowpowered.plugins.simple;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.flowpowered.cerealization.config.Configuration;
-import com.flowpowered.cerealization.config.ConfigurationException;
-import com.flowpowered.cerealization.config.ConfigurationNode;
-import com.flowpowered.cerealization.config.yaml.YamlConfiguration;
-import com.flowpowered.plugins.Context;
-import com.flowpowered.plugins.ContextCreator;
-import com.flowpowered.plugins.InvalidPluginException;
-import com.flowpowered.plugins.Plugin;
-import com.flowpowered.plugins.PluginLoader;
-import com.flowpowered.plugins.PluginManager;
-
-public class SimplePluginLoader extends PluginLoader {
- private static final String DESCRIPTOR_NAME = "plugin.yml";
- private static final String NAME_KEY = "name";
- private static final String MAIN_KEY = "main";
- private final ClassLoader cl;
- private final String descriptorName, nameKey, mainKey;
-
- public SimplePluginLoader(ContextCreator contextCreator, ClassLoader cl) {
- this(contextCreator, cl, DESCRIPTOR_NAME);
- }
-
- public SimplePluginLoader(ContextCreator contextCreator, ClassLoader cl, String descriptorName) {
- this(contextCreator, cl, descriptorName, NAME_KEY, MAIN_KEY);
- }
-
- public SimplePluginLoader(ContextCreator contextCreator, ClassLoader cl, String descriptorName, String nameKey, String mainKey) {
- super(contextCreator);
- this.cl = cl;
- this.descriptorName = descriptorName;
- this.nameKey = nameKey;
- this.mainKey = mainKey;
- }
-
- protected ClassLoader getClassLoader() {
- return cl;
- }
-
- @Override
- public Plugin load(PluginManager manager, String pluginName) throws InvalidPluginException {
- return load(manager, pluginName, findMains());
- }
-
- protected Plugin load(PluginManager manager, String pluginName, Map mains) throws InvalidPluginException {
- String main = mains.get(pluginName);
- if (main == null) {
- throw new InvalidPluginException("No main class specified");
- }
- try {
- Class> clazz = Class.forName(main, true, cl);
- @SuppressWarnings("unchecked")
- Class> pluginClass = (Class>) clazz.asSubclass(Plugin.class);
- return init(pluginClass.newInstance(), pluginName, manager);
- } catch (ClassNotFoundException | ClassCastException | InstantiationException | IllegalAccessException e) {
- // TODO: log
- e.printStackTrace();
- } catch (ExceptionInInitializerError e) {
- throw new InvalidPluginException("Exception in Plugin initialization", e);
- }
- return null;
- }
-
- @Override
- public Map> loadAll(PluginManager manager) {
- Map> loaded = new HashMap<>();
- Map mains = findMains();
- for (String name : mains.keySet()) {
- Plugin plugin;
- try {
- plugin = load(manager, name, mains);
- if (plugin != null) {
- loaded.put(name, plugin);
- }
- } catch (Exception ex) {
- // TODO: log
- ex.printStackTrace();
- }
- }
- return loaded;
- }
-
- protected Map findMains() {
- Map mains = new HashMap<>();
- Enumeration urls;
- try {
- urls = cl.getResources(descriptorName);
- } catch (IOException e) {
- // TODO log
- e.printStackTrace();
- return mains;
- }
- ArrayList list = Collections.list(urls);
- for (URL url : list) {
- try {
- Configuration conf = new YamlConfiguration(url.openStream());
- conf.load();
- ConfigurationNode name = conf.getChild(nameKey);
- if (name == null || name.getString("").isEmpty()) {
- // TODO: log
- continue;
- }
- ConfigurationNode main = conf.getChild(mainKey);
- if (main == null || main.getString("").isEmpty()) {
- // TODO: log
- continue;
- }
- mains.put(name.getString(), main.getString());
- } catch (IOException e) {
- // TODO: log
- e.printStackTrace();
- } catch (ConfigurationException ex) {
- ex.printStackTrace();
- }
-
- }
- return mains;
- }
-}
diff --git a/stylesheet.css b/stylesheet.css
new file mode 100644
index 0000000..cebb4fd
--- /dev/null
+++ b/stylesheet.css
@@ -0,0 +1,574 @@
+/* Javadoc style sheet */
+/*
+Overall document style
+*/
+
+@import url('resources/fonts/dejavu.css');
+
+body {
+ background-color:#ffffff;
+ color:#353833;
+ font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
+ font-size:14px;
+ margin:0;
+}
+a:link, a:visited {
+ text-decoration:none;
+ color:#4A6782;
+}
+a:hover, a:focus {
+ text-decoration:none;
+ color:#bb7a2a;
+}
+a:active {
+ text-decoration:none;
+ color:#4A6782;
+}
+a[name] {
+ color:#353833;
+}
+a[name]:hover {
+ text-decoration:none;
+ color:#353833;
+}
+pre {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+}
+h1 {
+ font-size:20px;
+}
+h2 {
+ font-size:18px;
+}
+h3 {
+ font-size:16px;
+ font-style:italic;
+}
+h4 {
+ font-size:13px;
+}
+h5 {
+ font-size:12px;
+}
+h6 {
+ font-size:11px;
+}
+ul {
+ list-style-type:disc;
+}
+code, tt {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ padding-top:4px;
+ margin-top:8px;
+ line-height:1.4em;
+}
+dt code {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ padding-top:4px;
+}
+table tr td dt code {
+ font-family:'DejaVu Sans Mono', monospace;
+ font-size:14px;
+ vertical-align:top;
+ padding-top:4px;
+}
+sup {
+ font-size:8px;
+}
+/*
+Document title and Copyright styles
+*/
+.clear {
+ clear:both;
+ height:0px;
+ overflow:hidden;
+}
+.aboutLanguage {
+ float:right;
+ padding:0px 21px;
+ font-size:11px;
+ z-index:200;
+ margin-top:-9px;
+}
+.legalCopy {
+ margin-left:.5em;
+}
+.bar a, .bar a:link, .bar a:visited, .bar a:active {
+ color:#FFFFFF;
+ text-decoration:none;
+}
+.bar a:hover, .bar a:focus {
+ color:#bb7a2a;
+}
+.tab {
+ background-color:#0066FF;
+ color:#ffffff;
+ padding:8px;
+ width:5em;
+ font-weight:bold;
+}
+/*
+Navigation bar styles
+*/
+.bar {
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ padding:.8em .5em .4em .8em;
+ height:auto;/*height:1.8em;*/
+ font-size:11px;
+ margin:0;
+}
+.topNav {
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ float:left;
+ padding:0;
+ width:100%;
+ clear:right;
+ height:2.8em;
+ padding-top:10px;
+ overflow:hidden;
+ font-size:12px;
+}
+.bottomNav {
+ margin-top:10px;
+ background-color:#4D7A97;
+ color:#FFFFFF;
+ float:left;
+ padding:0;
+ width:100%;
+ clear:right;
+ height:2.8em;
+ padding-top:10px;
+ overflow:hidden;
+ font-size:12px;
+}
+.subNav {
+ background-color:#dee3e9;
+ float:left;
+ width:100%;
+ overflow:hidden;
+ font-size:12px;
+}
+.subNav div {
+ clear:left;
+ float:left;
+ padding:0 0 5px 6px;
+ text-transform:uppercase;
+}
+ul.navList, ul.subNavList {
+ float:left;
+ margin:0 25px 0 0;
+ padding:0;
+}
+ul.navList li{
+ list-style:none;
+ float:left;
+ padding: 5px 6px;
+ text-transform:uppercase;
+}
+ul.subNavList li{
+ list-style:none;
+ float:left;
+}
+.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
+ color:#FFFFFF;
+ text-decoration:none;
+ text-transform:uppercase;
+}
+.topNav a:hover, .bottomNav a:hover {
+ text-decoration:none;
+ color:#bb7a2a;
+ text-transform:uppercase;
+}
+.navBarCell1Rev {
+ background-color:#F8981D;
+ color:#253441;
+ margin: auto 5px;
+}
+.skipNav {
+ position:absolute;
+ top:auto;
+ left:-9999px;
+ overflow:hidden;
+}
+/*
+Page header and footer styles
+*/
+.header, .footer {
+ clear:both;
+ margin:0 20px;
+ padding:5px 0 0 0;
+}
+.indexHeader {
+ margin:10px;
+ position:relative;
+}
+.indexHeader span{
+ margin-right:15px;
+}
+.indexHeader h1 {
+ font-size:13px;
+}
+.title {
+ color:#2c4557;
+ margin:10px 0;
+}
+.subTitle {
+ margin:5px 0 0 0;
+}
+.header ul {
+ margin:0 0 15px 0;
+ padding:0;
+}
+.footer ul {
+ margin:20px 0 5px 0;
+}
+.header ul li, .footer ul li {
+ list-style:none;
+ font-size:13px;
+}
+/*
+Heading styles
+*/
+div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
+ background-color:#dee3e9;
+ border:1px solid #d0d9e0;
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ background-color:#dee3e9;
+ border:1px solid #d0d9e0;
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+ul.blockList ul.blockList li.blockList h3 {
+ padding:0;
+ margin:15px 0;
+}
+ul.blockList li.blockList h2 {
+ padding:0px 0 20px 0;
+}
+/*
+Page layout container styles
+*/
+.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
+ clear:both;
+ padding:10px 20px;
+ position:relative;
+}
+.indexContainer {
+ margin:10px;
+ position:relative;
+ font-size:12px;
+}
+.indexContainer h2 {
+ font-size:13px;
+ padding:0 0 3px 0;
+}
+.indexContainer ul {
+ margin:0;
+ padding:0;
+}
+.indexContainer ul li {
+ list-style:none;
+ padding-top:2px;
+}
+.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
+ font-size:12px;
+ font-weight:bold;
+ margin:10px 0 0 0;
+ color:#4E4E4E;
+}
+.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
+ margin:5px 0 10px 0px;
+ font-size:14px;
+ font-family:'DejaVu Sans Mono',monospace;
+}
+.serializedFormContainer dl.nameValue dt {
+ margin-left:1px;
+ font-size:1.1em;
+ display:inline;
+ font-weight:bold;
+}
+.serializedFormContainer dl.nameValue dd {
+ margin:0 0 0 1px;
+ font-size:1.1em;
+ display:inline;
+}
+/*
+List styles
+*/
+ul.horizontal li {
+ display:inline;
+ font-size:0.9em;
+}
+ul.inheritance {
+ margin:0;
+ padding:0;
+}
+ul.inheritance li {
+ display:inline;
+ list-style:none;
+}
+ul.inheritance li ul.inheritance {
+ margin-left:15px;
+ padding-left:15px;
+ padding-top:1px;
+}
+ul.blockList, ul.blockListLast {
+ margin:10px 0 10px 0;
+ padding:0;
+}
+ul.blockList li.blockList, ul.blockListLast li.blockList {
+ list-style:none;
+ margin-bottom:15px;
+ line-height:1.4;
+}
+ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
+ padding:0px 20px 5px 10px;
+ border:1px solid #ededed;
+ background-color:#f8f8f8;
+}
+ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
+ padding:0 0 5px 8px;
+ background-color:#ffffff;
+ border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
+ margin-left:0;
+ padding-left:0;
+ padding-bottom:15px;
+ border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
+ list-style:none;
+ border-bottom:none;
+ padding-bottom:0;
+}
+table tr td dl, table tr td dl dt, table tr td dl dd {
+ margin-top:0;
+ margin-bottom:1px;
+}
+/*
+Table styles
+*/
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
+ width:100%;
+ border-left:1px solid #EEE;
+ border-right:1px solid #EEE;
+ border-bottom:1px solid #EEE;
+}
+.overviewSummary, .memberSummary {
+ padding:0px;
+}
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
+ position:relative;
+ text-align:left;
+ background-repeat:no-repeat;
+ color:#253441;
+ font-weight:bold;
+ clear:none;
+ overflow:hidden;
+ padding:0px;
+ padding-top:10px;
+ padding-left:1px;
+ margin:0px;
+ white-space:pre;
+}
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
+ color:#FFFFFF;
+}
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ padding-bottom:7px;
+ display:inline-block;
+ float:left;
+ background-color:#F8981D;
+ border: none;
+ height:16px;
+}
+.memberSummary caption span.activeTableTab span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ margin-right:3px;
+ display:inline-block;
+ float:left;
+ background-color:#F8981D;
+ height:16px;
+}
+.memberSummary caption span.tableTab span {
+ white-space:nowrap;
+ padding-top:5px;
+ padding-left:12px;
+ padding-right:12px;
+ margin-right:3px;
+ display:inline-block;
+ float:left;
+ background-color:#4D7A97;
+ height:16px;
+}
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
+ padding-top:0px;
+ padding-left:0px;
+ padding-right:0px;
+ background-image:none;
+ float:none;
+ display:inline;
+}
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
+ display:none;
+ width:5px;
+ position:relative;
+ float:left;
+ background-color:#F8981D;
+}
+.memberSummary .activeTableTab .tabEnd {
+ display:none;
+ width:5px;
+ margin-right:3px;
+ position:relative;
+ float:left;
+ background-color:#F8981D;
+}
+.memberSummary .tableTab .tabEnd {
+ display:none;
+ width:5px;
+ margin-right:3px;
+ position:relative;
+ background-color:#4D7A97;
+ float:left;
+
+}
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
+ text-align:left;
+ padding:0px 0px 12px 10px;
+ width:100%;
+}
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+ vertical-align:top;
+ padding-right:0px;
+ padding-top:8px;
+ padding-bottom:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
+ background:#dee3e9;
+ text-align:left;
+ padding:8px 3px 3px 7px;
+}
+td.colFirst, th.colFirst {
+ white-space:nowrap;
+ font-size:13px;
+}
+td.colLast, th.colLast {
+ font-size:13px;
+}
+td.colOne, th.colOne {
+ font-size:13px;
+}
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
+ width:25%;
+ vertical-align:top;
+}
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+ font-weight:bold;
+}
+.tableSubHeadingColor {
+ background-color:#EEEEFF;
+}
+.altColor {
+ background-color:#FFFFFF;
+}
+.rowColor {
+ background-color:#EEEEEF;
+}
+/*
+Content styles
+*/
+.description pre {
+ margin-top:0;
+}
+.deprecatedContent {
+ margin:0;
+ padding:10px 0;
+}
+.docSummary {
+ padding:0;
+}
+
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ font-style:normal;
+}
+
+div.block {
+ font-size:14px;
+ font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
+}
+
+td.colLast div {
+ padding-top:0px;
+}
+
+
+td.colLast a {
+ padding-bottom:3px;
+}
+/*
+Formatting effect styles
+*/
+.sourceLineNo {
+ color:green;
+ padding:0 30px 0 0;
+}
+h1.hidden {
+ visibility:hidden;
+ overflow:hidden;
+ font-size:10px;
+}
+.block {
+ display:block;
+ margin:3px 10px 2px 0px;
+ color:#474747;
+}
+.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
+.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
+.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
+ font-weight:bold;
+}
+.deprecationComment, .emphasizedPhrase, .interfaceName {
+ font-style:italic;
+}
+
+div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
+div.block div.block span.interfaceName {
+ font-style:normal;
+}
+
+div.contentContainer ul.blockList li.blockList h2{
+ padding-bottom:0px;
+}