Class ElementReflectionUtils
java.lang.Object
dev.getelements.elements.sdk.util.reflection.ElementReflectionUtils
Some basic utilities for accessing reflections within SDK code.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementReflectionUtils
Gets the static shared instance.Gets thePackage
from the package-info class.getPackageForElementsAnnotations
(String name, ClassLoader classLoader) Gets thePackage
from the package-info class.Class
<?> getPackageInfo
(String name) Gets the package-infoClass
for the supplied package name.Class
<?> getPackageInfo
(String name, ClassLoader classLoader) Gets the package-infoClass
for the supplied package name.
-
Constructor Details
-
ElementReflectionUtils
public ElementReflectionUtils()
-
-
Method Details
-
getInstance
Gets the static shared instance.- Returns:
- the
ElementReflectionUtils
-
getPackageInfo
Gets the package-infoClass
for the supplied package name.- Parameters:
name
- the package name- Returns:
- the
Package
-
getPackageInfo
Gets the package-infoClass
for the supplied package name.- Parameters:
name
- the package nameclassLoader
- theClassLoader
to use- Returns:
- the
Package
-
getPackageForElementsAnnotations
Gets thePackage
from the package-info class.- Parameters:
name
- the package name- Returns:
- the
Package
-
getPackageForElementsAnnotations
Gets thePackage
from the package-info class.- Parameters:
name
- the package nameclassLoader
- theClassLoader
to use- Returns:
- the
Package
-