-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: finish vrflux and add vrreflect
- Loading branch information
1 parent
184982d
commit 087986c
Showing
5 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
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> | ||
|
||
<parent> | ||
<artifactId>vrml</artifactId> | ||
<groupId>group.rxcloud</groupId> | ||
<version>1.1.2</version> | ||
</parent> | ||
|
||
<artifactId>vrml-reflect</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
</properties> | ||
|
||
</project> |
25 changes: 25 additions & 0 deletions
25
vrml-reflect/src/main/java/group/rxcloud/vrml/reflect/VrReflectUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package group.rxcloud.vrml.reflect; | ||
|
||
import java.lang.reflect.Constructor; | ||
import java.lang.reflect.InvocationTargetException; | ||
|
||
/** | ||
* The Vrml reflect utils. | ||
*/ | ||
public class VrReflectUtils { | ||
|
||
/** | ||
* Create obj by class object. | ||
* | ||
* @param clazz the clazz | ||
* @return the object | ||
* @throws NoSuchMethodException the no such method exception | ||
* @throws InvocationTargetException the invocation target exception | ||
* @throws InstantiationException the instantiation exception | ||
* @throws IllegalAccessException the illegal access exception | ||
*/ | ||
public static <T> T createObjByClass(Class<T> clazz) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { | ||
Constructor<T> constructor = clazz.getConstructor(); | ||
return constructor.newInstance(); | ||
} | ||
} |