propertyNames, Class> beanType) {
* Checks if a given type is a terminal type or an enum.
*
* @param type The type to be checked.
+ *
* @return True: the given type is a terminal or an enum. False: the given type is neither a terminal type nor an enum.
*/
public boolean isTerminal(Type type) {
if (TERMINAL_TYPES.contains(type)) {
return true;
} else if (type instanceof Class) {
- return ((Class>) type).isEnum()
- || ((Class>) type).isPrimitive()
- || ApplicationConversionService.getSharedInstance().canConvert(String.class, (Class>) type)
- || ApplicationConversionService.getSharedInstance().canConvert(Number.class, (Class>) type);
+ return ((Class>) type).isEnum() || ((Class>) type).isPrimitive() || ApplicationConversionService.getSharedInstance()
+ .canConvert(String.class, (Class>) type) || (ApplicationConversionService.getSharedInstance()
+ .canConvert(Number.class, (Class>) type));
}
return false;
}
@@ -127,6 +128,7 @@ public boolean isTerminal(Type type) {
* Every class which is no Collection, Map or terminal (see {@link #isTerminal(Type)} is classified as POJO.
*
* @param type the type to check
+ *
* @return true if the given type is a pojo.
*/
public boolean isBean(Type type) {
@@ -149,6 +151,7 @@ public boolean isBean(Type type) {
* Checks if a given type is a list of terminal types
*
* @param type
+ *
* @return True: the given type is a list of a terminal type. False: either the given type is not a list or not a list of terminal types
*/
public boolean isListOfTerminalTypes(Type type) {
@@ -161,13 +164,13 @@ public boolean isListOfTerminalTypes(Type type) {
return false;
}
-
/**
* This method takes an array of strings and returns each entry as ArrayList containing the parts of each element.
*
* 'inspectit.hello-i-am-testing' would be returned as {'inspectit', 'helloIAmTesting'}
*
* @param propertyName A String containing the property path
+ *
* @return a List containing containing the parts of the property path as String
*/
public List parse(String propertyName) {
@@ -190,6 +193,7 @@ public List parse(String propertyName) {
*
* @param propertyName A String with the path of a property
* @param result Reference to the list in which the extracted expressions should be saved in
+ *
* @return the remaining expression
*/
private String extractExpression(String propertyName, List result) {
@@ -237,13 +241,13 @@ private String removeLeadingDot(String string) {
}
}
-
/**
* Checks if two paths are the same. If one path uses the Wildcard "*", the check with the corresponding literal in the
* other path return true.
*
* @param pathA the first path to be compared
* @param pathB the second path to be compared
+ *
* @return
*/
public boolean comparePaths(List pathA, List pathB) {
@@ -265,6 +269,7 @@ public boolean comparePaths(List pathA, List pathB) {
*
* @param a the first path to be compared
* @param a the second path to be compared
+ *
* @return Returns true if each String in the two paths is equal.
*/
public boolean comparePathsIgnoreCamelOrKebabCase(List a, List b) {
@@ -279,7 +284,6 @@ public boolean comparePathsIgnoreCamelOrKebabCase(List a, List b
return true;
}
-
/**
* Checks if the first given path starts with the second given full path
*
@@ -289,6 +293,7 @@ public boolean comparePathsIgnoreCamelOrKebabCase(List a, List b
*
* @param path The path you want to check
* @param prefix The prefix the other path should begin with
+ *
* @return
*/
public boolean hasPathPrefix(List path, List prefix) {