/** * Returns true if the bean defines a property with the given name. * <p> * The given name must be a <code>String</code>; if not, this method * returns false. This method will also return false if the bean * does not define a property with that name. * <p> * Write-only properties will not be matched as the test operates against * property read methods. * * @param name the name of the property to check * @return false if the given name is null or is not a <code>String</code>; * false if the bean does not define a property with that name; or * true if the bean does define a property with that name */ @Override public boolean containsKey(final Object name) { final Method method = getReadMethod(name); return method != null; }
/** * Returns true if the bean defines a property with the given name. * <p> * The given name must be a <code>String</code>; if not, this method * returns false. This method will also return false if the bean * does not define a property with that name. * <p> * Write-only properties will not be matched as the test operates against * property read methods. * * @param name the name of the property to check * @return false if the given name is null or is not a <code>String</code>; * false if the bean does not define a property with that name; or * true if the bean does define a property with that name */ @Override public boolean containsKey(final Object name) { final Method method = getReadMethod(name); return method != null; }
public Object get(final Object name) { if ( bean != null ) { final Method method = getReadMethod( name ); if ( method != null ) { try {
public Object get(final Object name) { if ( bean != null ) { final Method method = getReadMethod( name ); if ( method != null ) { try {
/** * Returns true if the bean defines a property with the given name. * <p> * The given name must be a <code>String</code>; if not, this method * returns false. This method will also return false if the bean * does not define a property with that name. * <p> * Write-only properties will not be matched as the test operates against * property read methods. * * @param name the name of the property to check * @return false if the given name is null or is not a <code>String</code>; * false if the bean does not define a property with that name; or * true if the bean does define a property with that name */ public boolean containsKey(Object name) { Method method = getReadMethod(name); return method != null; }
/** * Returns true if the bean defines a property with the given name. * <p> * The given name must be a <code>String</code>; if not, this method * returns false. This method will also return false if the bean * does not define a property with that name. * <p> * Write-only properties will not be matched as the test operates against * property read methods. * * @param name the name of the property to check * @return false if the given name is null or is not a <code>String</code>; * false if the bean does not define a property with that name; or * true if the bean does define a property with that name */ public boolean containsKey(Object name) { Method method = getReadMethod(name); return method != null; }
/** * Returns true if the bean defines a property with the given name. * <p> * The given name must be a <code>String</code>; if not, this method * returns false. This method will also return false if the bean * does not define a property with that name. * <p> * Write-only properties will not be matched as the test operates against * property read methods. * * @param name the name of the property to check * @return false if the given name is null or is not a <code>String</code>; * false if the bean does not define a property with that name; or * true if the bean does define a property with that name */ public boolean containsKey(Object name) { Method method = getReadMethod(name); return method != null; }
/** * Returns true if the bean defines a property with the given name. * <p> * The given name must be a <code>String</code>; if not, this method * returns false. This method will also return false if the bean * does not define a property with that name. * <p> * Write-only properties will not be matched as the test operates against * property read methods. * * @param name the name of the property to check * @return false if the given name is null or is not a <code>String</code>; * false if the bean does not define a property with that name; or * true if the bean does define a property with that name */ @Override public boolean containsKey(final Object name) { final Method method = getReadMethod(name); return method != null; }
@SuppressWarnings("unchecked") protected Method getGetter(Class<?> objectClass, BeanMap beanMap, String keyName) { //check element to prevent null pointer Element element = getGetterCache().get(objectClass); Map<String, Method> getterMap = (element == null ? null : (Map<String, Method>) element.getObjectValue()); if (getterMap == null) { getterMap = new HashMap<String, Method>(); getGetterCache().put(new Element(objectClass, getterMap)); } Method getter; if (getterMap.containsKey(keyName)) { getter = getterMap.get(keyName); } else { getter = beanMap.getReadMethod(keyName); getterMap.put(keyName, getter); } return getter; }
@SuppressWarnings("unchecked") protected Method getGetter(Class<?> objectClass, BeanMap beanMap, String keyName) { //check element to prevent null pointer Element element = getGetterCache().get(objectClass); Map<String, Method> getterMap = (element == null ? null : (Map<String, Method>) element.getObjectValue()); if (getterMap == null) { getterMap = new HashMap<String, Method>(); getGetterCache().put(new Element(objectClass, getterMap)); } Method getter; if (getterMap.containsKey(keyName)) { getter = getterMap.get(keyName); } else { getter = beanMap.getReadMethod(keyName); getterMap.put(keyName, getter); } return getter; }
public Object get(final Object name) { if ( bean != null ) { final Method method = getReadMethod( name ); if ( method != null ) { try {
Method method = getReadMethod( name ); if ( method != null ) { try {
Method method = getReadMethod( name ); if ( method != null ) { try {
Method method = getReadMethod( name ); if ( method != null ) { try {