package naming refactored
This commit is contained in:
@@ -48,28 +48,30 @@ The build also produces source and Javadoc artifacts. The project coordinates ar
|
||||
Configure a scope, load it once, and query the resulting index:
|
||||
|
||||
```java
|
||||
import dux.scanpath.v1.ClasspathScanner;
|
||||
import dux.scanpath.v1.ScanScope;
|
||||
import dxt.scanpath.v1.ClasspathScanner;
|
||||
import dxt.scanpath.v1.ScanScope;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
ScanScope scope = new ScanScope()
|
||||
.includePackage("com.example.plugins")
|
||||
.excludePackage("com.example.plugins.internal")
|
||||
.addClassPath("build/classes/java/main")
|
||||
.addLibPath("lib");
|
||||
.includePackage("com.example.plugins")
|
||||
.excludePackage("com.example.plugins.internal")
|
||||
.addClassPath("build/classes/java/main")
|
||||
.addLibPath("lib");
|
||||
|
||||
ClasspathScanner scanner = new ClasspathScanner();
|
||||
scanner.load(scope);
|
||||
scanner.
|
||||
|
||||
load(scope);
|
||||
|
||||
List<Class<?>> implementations =
|
||||
scanner.listInheritingClasses(MyPlugin.class);
|
||||
scanner.listInheritingClasses(MyPlugin.class);
|
||||
List<Class<?>> annotatedTypes =
|
||||
scanner.listAnnotatedClasses(Discoverable.class);
|
||||
scanner.listAnnotatedClasses(Discoverable.class);
|
||||
List<Class<?>> annotatedFields =
|
||||
scanner.listClassesWithAnnotatedFields(Inject.class);
|
||||
scanner.listClassesWithAnnotatedFields(Inject.class);
|
||||
List<Class<?>> annotatedMethods =
|
||||
scanner.listClassesWithAnnotatedMethods(Handler.class);
|
||||
scanner.listClassesWithAnnotatedMethods(Handler.class);
|
||||
```
|
||||
|
||||
`addClassPath` accepts a class directory or an individual `.jar` or `.zip` file. `addLibPath`
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>dux.scanpath</groupId>
|
||||
<artifactId>dux.scanpath</artifactId>
|
||||
<groupId>dxt.scanpath</groupId>
|
||||
<artifactId>dxt.scanpath</artifactId>
|
||||
<version>v1-SNAPSHOT</version>
|
||||
<name>scanpath</name>
|
||||
<description>Scans the Java classpath for specific entities</description>
|
||||
|
||||
+13
-13
@@ -12,20 +12,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1;
|
||||
package dxt.scanpath.v1;
|
||||
|
||||
import dux.scanpath.v1.support.ClassAnnotationVisitor;
|
||||
import dux.scanpath.v1.support.ClassFile;
|
||||
import dux.scanpath.v1.support.ClassFilter;
|
||||
import dux.scanpath.v1.support.ClassList;
|
||||
import dux.scanpath.v1.support.ClassVisitor;
|
||||
import dux.scanpath.v1.support.DiskClassList;
|
||||
import dux.scanpath.v1.support.FieldAnnotationVisitor;
|
||||
import dux.scanpath.v1.support.InheritanceVisitor;
|
||||
import dux.scanpath.v1.support.JarClassList;
|
||||
import dux.scanpath.v1.support.MetaStore;
|
||||
import dux.scanpath.v1.support.MethodAnnotationVisitor;
|
||||
import dux.scanpath.v1.support.ZipClassList;
|
||||
import dxt.scanpath.v1.support.ClassAnnotationVisitor;
|
||||
import dxt.scanpath.v1.support.ClassFile;
|
||||
import dxt.scanpath.v1.support.ClassFilter;
|
||||
import dxt.scanpath.v1.support.ClassList;
|
||||
import dxt.scanpath.v1.support.ClassVisitor;
|
||||
import dxt.scanpath.v1.support.DiskClassList;
|
||||
import dxt.scanpath.v1.support.FieldAnnotationVisitor;
|
||||
import dxt.scanpath.v1.support.InheritanceVisitor;
|
||||
import dxt.scanpath.v1.support.JarClassList;
|
||||
import dxt.scanpath.v1.support.MetaStore;
|
||||
import dxt.scanpath.v1.support.MethodAnnotationVisitor;
|
||||
import dxt.scanpath.v1.support.ZipClassList;
|
||||
import javassist.ClassPool;
|
||||
import javassist.NotFoundException;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1;
|
||||
package dxt.scanpath.v1;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import javassist.CtClass;
|
||||
import javassist.NotFoundException;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
/**
|
||||
* Abstracts out a collection of class files that can be read from a specific location. This
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import javassist.ClassPool;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import javassist.CtClass;
|
||||
import javassist.CtField;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import javassist.CtClass;
|
||||
import javassist.NotFoundException;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import javassist.CtClass;
|
||||
import javassist.CtMethod;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v1.support;
|
||||
package dxt.scanpath.v1.support;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
Reference in New Issue
Block a user