Uses of Package
dk.cloudcreate.essentials.shared.types
-
Packages that use dk.cloudcreate.essentials.shared.types Package Description dk.cloudcreate.essentials.shared.reflection.invocation -
Classes in dk.cloudcreate.essentials.shared.types used by dk.cloudcreate.essentials.shared.reflection.invocation Class Description GenericType Using this class makes it possible to capture a generic/parameterized argument type, such asList<Money>, instead of having to rely on the classical.classconstruct.
When you specify a type reference using.classyou loose any Generic/Parameterized information, as you cannot writeList<Money>.class, onlyList.class.
WithGenericTypeyou can specify and capture parameterized type information
You can specify a parameterized type usingGenericType:
var genericType = new GenericType<List<Money>>(){};
TheGenericType.type/GenericType.getType()will returnList.class
AndGenericType.genericType/GenericType.getGenericType()will returnParameterizedType, which can be introspected further
You can also supply a non-parameterized type toGenericType:
var genericType = new GenericType<Money>(){};
In which caseGenericType.type/GenericType.getType()will returnMoney.class
AndGenericType.genericType/GenericType.getGenericType()will returnMoney.class