2362N/A * Copyright (c) 2005, 2006, 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 * Per-MBean-interface behavior. A single instance of this class can be shared 0N/A * by all MBeans of the same kind (Standard MBean or MXBean) that have the same 0N/A * This method is called when invoke doesn't find the named method. 0N/A * Before throwing an exception, we check to see whether the 0N/A * jmx.invoke.getters property is set, and if so whether the method 0N/A * being invoked might be a getter or a setter. If so we invoke it 0N/A * and return the result. This is for compatibility 0N/A * with code based on JMX RI 1.0 or 1.1 which allowed invoking getters 0N/A * and setters. It is *not* recommended that new code use this feature. 0N/A * Since this method is either going to throw an exception or use 0N/A * functionality that is strongly discouraged, we consider that its 0N/A * performance is not very important. 0N/A * A simpler way to implement the functionality would be to add the getters 0N/A * and setters to the operations map when jmx.invoke.getters is set. 0N/A * However, that means that the property is consulted when an MBean 0N/A * interface is being introspected and not thereafter. Previously, 0N/A * the property was consulted on every invocation. So this simpler 0N/A * implementation could potentially break code that sets and unsets 0N/A * the property at different times. 0N/A // Construct the exception that we will probably throw 0N/A // Is the compatibility property set? 0N/A // We don't expect an exception here but if we get one then 0N/A // we'll simply assume that the property is not set. 0N/A * Visitor that sets up the method maps (operations, getters, setters).