Package org.cyclos.server.utils
Class PropertyHelper
- java.lang.Object
-
- org.cyclos.server.utils.PropertyHelper
-
public class PropertyHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description PropertyHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontains(Object property, Object... properties)Returns whether the given property is contained in the given properties list.static booleancontainsName(String name, Property<?,?>... properties)Returns whether any of the given properties has the given namestatic MethodgetGetter(Class<?> clazz, String name)Returns the getter for the given property on the given classstatic StringgetGetterName(com.querydsl.core.types.Path<?> path)Returns the gettern name for the given property pathstatic List<String>getGetterNames(com.querydsl.core.types.Path<?>... paths)Returns the getter names for all the given pathsstatic StringgetPropertyName(com.querydsl.core.types.Path<?> path)Returns the property name from a Querydsl pathstatic StringgetPropertyName(Object object)Returns the property name from a bean property.static StringgetPropertyName(Method method)Returns the property name of the given method, or throws anIllegalArgumentExceptionif the method is not a getter or setterstatic booleanisSecretProperty(String property)Indicates whether the given property name should be considered secret / sensitive / private.
-
-
-
Method Detail
-
contains
public static boolean contains(Object property, Object... properties)
Returns whether the given property is contained in the given properties list. Actually, string representations are matched
-
containsName
public static boolean containsName(String name, Property<?,?>... properties)
Returns whether any of the given properties has the given name
-
getGetter
public static Method getGetter(Class<?> clazz, String name)
Returns the getter for the given property on the given class
-
getGetterName
public static String getGetterName(com.querydsl.core.types.Path<?> path)
Returns the gettern name for the given property path
-
getGetterNames
public static List<String> getGetterNames(com.querydsl.core.types.Path<?>... paths)
Returns the getter names for all the given paths
-
getPropertyName
public static String getPropertyName(Method method)
Returns the property name of the given method, or throws anIllegalArgumentExceptionif the method is not a getter or setter
-
getPropertyName
public static String getPropertyName(Object object)
Returns the property name from a bean property. Handles bean properties (Property), Querydsl paths (Path), methods and strings
-
getPropertyName
public static String getPropertyName(com.querydsl.core.types.Path<?> path)
Returns the property name from a Querydsl path
-
isSecretProperty
public static boolean isSecretProperty(String property)
Indicates whether the given property name should be considered secret / sensitive / private.
-
-