Class ElementReflectionUtils
java.lang.Object
dev.getelements.elements.sdk.util.reflection.ElementReflectionUtils
- All Implemented Interfaces:
ElementStandardBeanProperties
Some basic utilities for accessing reflections within SDK code.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.sdk.ElementStandardBeanProperties
ElementStandardBeanProperties.StandardBeanProperty<T> -
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.ElementStandardBeanProperties
ELEMENT_DEFINITION_RECORD, ELEMENT_DEFINITION_RECORD_PROPERTY, ELEMENT_RECORD, ELEMENT_RECORD_PROPERTY, ELEMENT_REGISTRY, ELEMENT_REGISTRY_PROPERTY, SERVICE_LOCATOR, SERVICE_LOCATOR_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementReflectionUtilsGets the static shared instance.Gets thePackagefrom the package-info class.getPackageForElementsAnnotations(String name, ClassLoader classLoader) Gets thePackagefrom the package-info class.Class<?> getPackageInfo(String name) Gets the package-infoClassfor the supplied package name.Class<?> getPackageInfo(String name, ClassLoader classLoader) Gets the package-infoClassfor the supplied package name.<T> TinjectBeanProperties(T target, Object... objects) Injects the standard bean properties into the supplied object.
-
Constructor Details
-
ElementReflectionUtils
public ElementReflectionUtils()
-
-
Method Details
-
getInstance
Gets the static shared instance.- Returns:
- the
ElementReflectionUtils
-
getPackageInfo
Gets the package-infoClassfor the supplied package name.- Parameters:
name- the package name- Returns:
- the
Package
-
getPackageInfo
Gets the package-infoClassfor the supplied package name.- Parameters:
name- the package nameclassLoader- theClassLoaderto use- Returns:
- the
Package
-
getPackageForElementsAnnotations
Gets thePackagefrom the package-info class.- Parameters:
name- the package name- Returns:
- the
Package
-
getPackageForElementsAnnotations
Gets thePackagefrom the package-info class.- Parameters:
name- the package nameclassLoader- theClassLoaderto use- Returns:
- the
Package
-
injectBeanProperties
Injects the standard bean properties into the supplied object. Standard bean property names are defined inElementStandardBeanProperties.- Type Parameters:
T- the target type- Parameters:
target- the targetobjects- the beans- Returns:
- the target object
-