Package swervelib.parser.deserializer
Class ReflectionsManager
java.lang.Object
swervelib.parser.deserializer.ReflectionsManager
Create classes only if the vendor dep exists.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumVendors that supply their own vendordep to communicate with their products. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck if the vendordep exists.static <T> Tcreate(ReflectionsManager.VENDOR v, String className, Class<?>[] parameterTypes, Object[] parameters) Create objects if the vendordep exists.
-
Constructor Details
-
ReflectionsManager
public ReflectionsManager()
-
-
Method Details
-
checkIfVendorLibExists
Check if the vendordep exists.- Parameters:
vendor- Vendor to check for their library.- Returns:
- Boolean on existence of their library.
-
create
public static <T> T create(ReflectionsManager.VENDOR v, String className, Class<?>[] parameterTypes, Object[] parameters) Create objects if the vendordep exists. Throw an exception when they dont.- Type Parameters:
T- Wrapper type.- Parameters:
v- Vendor to check if the vendordep exists.className- Wrapper classname to create.parameterTypes- Parameter types for the wrappers constructor.parameters- Parameters for the wrappers constructor- Returns:
- Wrapper object.
-