001/* 002 * Copyright 2002-2012 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.jmx.export.assembler; 018 019import java.lang.reflect.Method; 020 021/** 022 * Simple subclass of {@code AbstractReflectiveMBeanInfoAssembler} 023 * that always votes yes for method and property inclusion, effectively exposing 024 * all public methods and properties as operations and attributes. 025 * 026 * @author Rob Harrop 027 * @author Juergen Hoeller 028 * @since 1.2 029 */ 030public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBeanInfoAssembler { 031 032 /** 033 * Always returns {@code true}. 034 */ 035 @Override 036 protected boolean includeReadAttribute(Method method, String beanKey) { 037 return true; 038 } 039 040 /** 041 * Always returns {@code true}. 042 */ 043 @Override 044 protected boolean includeWriteAttribute(Method method, String beanKey) { 045 return true; 046 } 047 048 /** 049 * Always returns {@code true}. 050 */ 051 @Override 052 protected boolean includeOperation(Method method, String beanKey) { 053 return true; 054 } 055 056}