Skip to content

Commit

Permalink
提交1.0.15-SNAPSHOT,优化部分API
Browse files Browse the repository at this point in the history
  • Loading branch information
杜琨 committed Mar 8, 2018
1 parent 8947e95 commit dd5d771
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 14 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
<packaging>pom</packaging>

<name>sandbox ${sandbox.version}</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sandbox.version>1.0.14</sandbox.version>
<sandbox.version>1.0.15-SNAPSHOT</sandbox.version>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-agent</artifactId>
<name>sandbox-agent ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-api</artifactId>
<name>sandbox-api ${sandbox.version}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ public interface IBuildingForClass {
*/
IBuildingForClass includeBootstrap();

/**
* 是否包含被Bootstrap所加载的类
*
* @param isIncludeBootstrap TRUE:包含Bootstrap;FALSE:不包含Bootstrap;
* @return IBuildingForClass
* @see #includeBootstrap()
* @since {@code sandbox-api:1.0.15}
*/
IBuildingForClass isIncludeBootstrap(boolean isIncludeBootstrap);

/**
* {@link #onClass}所指定的类,检索路径是否包含子类(实现类)
* <ul>
Expand All @@ -58,6 +68,16 @@ public interface IBuildingForClass {
*/
IBuildingForClass includeSubClasses();

/**
* 是否包含被Bootstrap所加载的类
*
* @param isIncludeSubClasses TRUE:包含子类(实现类);FALSE:不包含子类(实现类);
* @return IBuildingForClass
* @see #includeSubClasses()
* @since {@code sandbox-api:1.0.15}
*/
IBuildingForClass isIncludeSubClasses(boolean isIncludeSubClasses);

/**
* 类修饰匹配
*
Expand Down Expand Up @@ -335,12 +355,28 @@ public IBuildingForClass includeBootstrap() {
return this;
}

@Override
public IBuildingForClass isIncludeBootstrap(boolean isIncludeBootstrap) {
if (isIncludeBootstrap) {
includeBootstrap();
}
return this;
}

@Override
public IBuildingForClass includeSubClasses() {
this.isIncludeSubClasses = true;
return this;
}

@Override
public IBuildingForClass isIncludeSubClasses(boolean isIncludeSubClasses) {
if (isIncludeSubClasses) {
includeSubClasses();
}
return this;
}

@Override
public IBuildingForClass withAccess(final int access) {
withAccess |= access;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.alibaba.jvm.sandbox.api.filter.Filter;

import java.util.Iterator;
import java.util.Set;

/**
Expand All @@ -26,4 +27,14 @@ public interface LoadedClassDataSource {
*/
Set<Class<?>> find(Filter filter);

/**
* 获取所有已加载类的集合迭代器
* <p>
* 对比 {@link #list()} 而言,有更优的内存、CPU开销
*
* @return 所有已加载的类集合迭代器
* @since {@code sandbox-api:1.0.15}
*/
Iterator<Class<?>> iteratorForLoadedClasses();

}
2 changes: 1 addition & 1 deletion sandbox-common-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-common-api</artifactId>
<name>sandbox-common-api ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-core</artifactId>
<name>sandbox-core ${sandbox.version}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*/
public interface CoreLoadedClassDataSource extends LoadedClassDataSource {

Iterator<Class<?>> iteratorForLoadedClasses();

/**
* 使用{@link Matcher}来完成类的检索
* <p>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-debug-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-module-starter</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
<relativePath>../sandbox-module-starter/pom.xml</relativePath>
</parent>
<artifactId>sandbox-debug-module</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-mgr-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-mgr-module</artifactId>
<name>sandbox-mgr-module ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-mgr-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-mgr-provider</artifactId>
<name>sandbox-mgr-provider ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-module-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-module-starter</artifactId>
<name>sandbox-module-starter ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-provider-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-provider-api</artifactId>
<name>sandbox-provider-api ${sandbox.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-spy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.14</version>
<version>1.0.15-SNAPSHOT</version>
</parent>
<artifactId>sandbox-spy</artifactId>
<name>sandbox-spy ${sandbox.version}</name>
Expand Down

0 comments on commit dd5d771

Please sign in to comment.