5879N/A * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class is intended to handle <property> element. 0N/A * This element simplifies access to the properties. 0N/A * If the {@code index} attribute is specified 0N/A * this element uses additional {@code int} parameter. 0N/A * If the {@code name} attribute is not specified 0N/A * this element uses method "get" as getter 1966N/A * and method "set" as setter. 1966N/A * This element defines getter if it contains no argument. 1696N/A * It returns the value of the property in this case. 1045N/A * <property name="object" index="10"/></pre> 0N/A * is shortcut to<pre> 0N/A * <method name="getObject"> 0N/A * <int>10</int> 0N/A * </method></pre> 6323N/A * which is equivalent to {@code getObject(10)} in Java code. 0N/A * This element defines setter if it contains one argument. 1045N/A * It does not return the value of the property in this case. 0N/A * <property><int>0</int></property></pre> 0N/A * <method name="set"> 1696N/A * which is equivalent to {@code set(0)} in Java code. 1696N/A * <p>The following atributes are supported: 0N/A * <dd>the property name 0N/A * <dd>the property index 0N/A * <dd>the identifier of the variable that is intended to store the result 0N/A * @author Sergey A. Malenkov 0N/A * Parses attributes of the element. 0N/A * The following atributes are supported: 0N/A * <dd>the property name 0N/A * <dd>the property index 0N/A * <dd>the identifier of the variable that is intended to store the result 0N/A * @param name the attribute name 0N/A * @param value the attribute value 1971N/A * Tests whether the value of this element can be used 1971N/A * as an argument of the element that contained in this one. 1971N/A * @return {@code true} if the value of this element should be used 1971N/A * as an argument of the element that contained in this one, 0N/A return false;
// non-static accessor cannot be used an argument 0N/A * Returns the value of the property with specified {@code name}. 0N/A * @param name the name of the property 0N/A * @return the value of the specified property 0N/A * Sets the new value for the property with specified {@code name}. 0N/A * @param name the name of the property 0N/A * @param value the new value for the specified property 1066N/A * Performs the search of the getter for the property 1066N/A * with specified {@code name} in specified class 1066N/A * and returns value of the property. 0N/A * @param bean the context bean that contains property 0N/A * @param name the name of the property 0N/A * @param index the index of the indexed property 0N/A * @return the value of the property 0N/A * @throws IllegalAccessException if the property is not accesible 1157N/A * @throws IntrospectionException if the bean introspection is failed 1157N/A * @throws InvocationTargetException if the getter cannot be invoked 1157N/A * @throws NoSuchMethodException if the getter is not found 0N/A * Performs the search of the setter for the property 0N/A * with specified {@code name} in specified class 0N/A * and updates value of the property. 0N/A * @param bean the context bean that contains property 0N/A * @param name the name of the property 0N/A * @param index the index of the indexed property 0N/A * @param value the new value for the property 0N/A * @throws IllegalAccessException if the property is not accesible 0N/A * @throws IntrospectionException if the bean introspection is failed 0N/A * @throws InvocationTargetException if the setter cannot be invoked 0N/A * @throws NoSuchMethodException if the setter is not found 4514N/A * Performs the search of the getter for the property 4514N/A * with specified {@code name} in specified class. 0N/A * @param type the class that contains method 0N/A * @param name the name of the property 0N/A * @param args the method arguments 0N/A * @return method object that represents found getter 0N/A * @throws IntrospectionException if the bean introspection is failed 4514N/A * @throws NoSuchMethodException if method is not found 0N/A * Performs the search of the setter for the property 0N/A * with specified {@code name} in specified class. 0N/A * @param type the class that contains method 0N/A * @param name the name of the property 216N/A * @param args the method arguments 0N/A * @return method object that represents found setter 0N/A * @throws IntrospectionException if the bean introspection is failed 0N/A * @throws NoSuchMethodException if method is not found 0N/A * Performs the search of the descriptor for the property 0N/A * with specified {@code name} in specified class. 1066N/A * @param type the class to introspect 0N/A * @param name the property name 0N/A * @return descriptor for the named property 0N/A * @throws IntrospectionException if property descriptor is not found