Class BeanUtilities
java.lang.Object
org.glassfish.hk2.configuration.internal.BeanUtilities
For JavaBean or Bean-Like-Map utilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringfirstUpper(String s) static ObjectgetBeanPropertyValue(Type requiredType, String attribute, BeanInfo beanInfo) Gets the value from the given attribute from the given bean Safe to give both a bean-like map and a java beanstatic StringgetParameterNameFromField(Field f, boolean onlyDynamic) Gets the parameter name from a fieldstatic StringgetParameterNameFromMethod(Method m, int paramIndex) static booleanstatic boolean
-
Field Details
-
GET
- See Also:
-
IS
- See Also:
-
EMPTY
- See Also:
-
-
Constructor Details
-
BeanUtilities
public BeanUtilities()
-
-
Method Details
-
firstUpper
-
getBeanPropertyValue
Gets the value from the given attribute from the given bean Safe to give both a bean-like map and a java bean- Parameters:
requiredType- the type the attribute must beattribute- the attribute to get. The bean must have a method with the name format getAttributebeanInfo- the bean info- Returns:
- the value of the attribute
- Throws:
IllegalStateException- if unable to get the attribute
-
isEmpty
-
getParameterNameFromField
Gets the parameter name from a field- Parameters:
f- the field annotated withConfiguredonlyDynamic- if true and theConfiguredannotation is notDynamicity.FULLY_DYNAMICthe null will be returned- Returns:
- the value of the
Configuredannotation if non-empty or the name of the field otherwise
-
getParameterNameFromMethod
-
hasDynamicParameter
-