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.v2.ClasspathScanner;
|
||||
import dux.scanpath.v2.ScanScope;
|
||||
import dxt.scanpath.v2.ClasspathScanner;
|
||||
import dxt.scanpath.v2.ScanScope;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
ScanScope scope = new ScanScope()
|
||||
.includePackage("com.example.plugins")
|
||||
.excludePackage("com.example.plugins.internal")
|
||||
.addClassPath("build/classes/java/main")
|
||||
.includeClassesByPattern("com\\.example\\.plugins\\..*Plugin");
|
||||
.includePackage("com.example.plugins")
|
||||
.excludePackage("com.example.plugins.internal")
|
||||
.addClassPath("build/classes/java/main")
|
||||
.includeClassesByPattern("com\\.example\\.plugins\\..*Plugin");
|
||||
|
||||
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);
|
||||
```
|
||||
|
||||
`ScanScope` includes the application classpath by default. Add explicit classpath entries when
|
||||
|
||||
@@ -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>v2-SNAPSHOT</version>
|
||||
<name>scanpath</name>
|
||||
<description>Scans the Java classpath for specific entities</description>
|
||||
|
||||
+4
-4
@@ -12,11 +12,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2;
|
||||
package dxt.scanpath.v2;
|
||||
|
||||
import dux.scanpath.v2.mstore.ClassNameFilter;
|
||||
import dux.scanpath.v2.mstore.MetaStore;
|
||||
import dux.scanpath.v2.mstore.MetaStoreBuilder;
|
||||
import dxt.scanpath.v2.mstore.ClassNameFilter;
|
||||
import dxt.scanpath.v2.mstore.MetaStore;
|
||||
import dxt.scanpath.v2.mstore.MetaStoreBuilder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2;
|
||||
package dxt.scanpath.v2;
|
||||
|
||||
import dux.scanpath.v2.mstore.ClassNameFilter;
|
||||
import dxt.scanpath.v2.mstore.ClassNameFilter;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.bc;
|
||||
package dxt.scanpath.v2.bc;
|
||||
|
||||
import java.lang.classfile.Annotation;
|
||||
import java.lang.classfile.ClassFile;
|
||||
+6
-6
@@ -12,13 +12,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.bc;
|
||||
package dxt.scanpath.v2.bc;
|
||||
|
||||
import dux.scanpath.v2.io.BinFile;
|
||||
import dux.scanpath.v2.io.BinSource;
|
||||
import dux.scanpath.v2.io.DiskBinSource;
|
||||
import dux.scanpath.v2.io.JarBinSource;
|
||||
import dux.scanpath.v2.io.ZipBinSource;
|
||||
import dxt.scanpath.v2.io.BinFile;
|
||||
import dxt.scanpath.v2.io.BinSource;
|
||||
import dxt.scanpath.v2.io.DiskBinSource;
|
||||
import dxt.scanpath.v2.io.JarBinSource;
|
||||
import dxt.scanpath.v2.io.ZipBinSource;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.bc;
|
||||
package dxt.scanpath.v2.bc;
|
||||
|
||||
import java.lang.classfile.AccessFlags;
|
||||
import java.lang.classfile.Annotation;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.bc;
|
||||
package dxt.scanpath.v2.bc;
|
||||
|
||||
import java.lang.classfile.AccessFlags;
|
||||
import java.lang.classfile.Annotation;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
/**
|
||||
* Provides access to class files discovered in a specific location, such as a directory, ZIP
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.io;
|
||||
package dxt.scanpath.v2.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
+3
-3
@@ -12,10 +12,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import dux.scanpath.v2.bc.ZClass;
|
||||
import dux.scanpath.v2.bc.ZClassContext;
|
||||
import dxt.scanpath.v2.bc.ZClass;
|
||||
import dxt.scanpath.v2.bc.ZClassContext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import dux.scanpath.v2.bc.ZClassContext;
|
||||
import dxt.scanpath.v2.bc.ZClassContext;
|
||||
|
||||
/**
|
||||
* Base class for visitors that inspect class metadata and populate a {@link MetaStore}.
|
||||
+4
-4
@@ -12,11 +12,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import dux.scanpath.v2.bc.ZClass;
|
||||
import dux.scanpath.v2.bc.ZClassContext;
|
||||
import dux.scanpath.v2.bc.ZField;
|
||||
import dxt.scanpath.v2.bc.ZClass;
|
||||
import dxt.scanpath.v2.bc.ZClassContext;
|
||||
import dxt.scanpath.v2.bc.ZField;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
+3
-3
@@ -12,10 +12,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import dux.scanpath.v2.bc.ZClass;
|
||||
import dux.scanpath.v2.bc.ZClassContext;
|
||||
import dxt.scanpath.v2.bc.ZClass;
|
||||
import dxt.scanpath.v2.bc.ZClassContext;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
+2
-2
@@ -12,9 +12,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import dux.scanpath.v2.bc.ZClassContext;
|
||||
import dxt.scanpath.v2.bc.ZClassContext;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
+4
-4
@@ -12,11 +12,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dux.scanpath.v2.mstore;
|
||||
package dxt.scanpath.v2.mstore;
|
||||
|
||||
import dux.scanpath.v2.bc.ZClass;
|
||||
import dux.scanpath.v2.bc.ZClassContext;
|
||||
import dux.scanpath.v2.bc.ZMethod;
|
||||
import dxt.scanpath.v2.bc.ZClass;
|
||||
import dxt.scanpath.v2.bc.ZClassContext;
|
||||
import dxt.scanpath.v2.bc.ZMethod;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
Reference in New Issue
Block a user