107 */ 108 public class CompositeDataInvocationHandler implements InvocationHandler { 109 /** 110 <p>Construct a handler backed by the given {@code 111 CompositeData}.</p> 112 113 @param compositeData the {@code CompositeData} that will supply 114 information to getters. 115 116 @throws IllegalArgumentException if {@code compositeData} 117 is null. 118 */ 119 public CompositeDataInvocationHandler(CompositeData compositeData) { 120 this(compositeData, null); 121 } 122 123 /** 124 <p>Construct a handler backed by the given {@code 125 CompositeData}.</p> 126 127 @param mbsc the {@code MBeanServerConnection} related to this 128 {@code CompositeData}. This is only relevant if a method in 129 the interface for which this is an invocation handler returns 130 a type that is an MXBean interface. Otherwise, it can be null. 131 132 @param compositeData the {@code CompositeData} that will supply 133 information to getters. 134 135 @throws IllegalArgumentException if {@code compositeData} 136 is null. 137 */ 138 CompositeDataInvocationHandler(CompositeData compositeData, 139 MXBeanLookup lookup) { 140 if (compositeData == null) 141 throw new IllegalArgumentException("compositeData"); 142 this.compositeData = compositeData; 143 this.lookup = lookup; 144 } 145 146 /** 147 Return the {@code CompositeData} that was supplied to the 148 constructor. 149 @return the {@code CompositeData} that this handler is backed 150 by. This is never null. 151 */ | 107 */ 108 public class CompositeDataInvocationHandler implements InvocationHandler { 109 /** 110 <p>Construct a handler backed by the given {@code 111 CompositeData}.</p> 112 113 @param compositeData the {@code CompositeData} that will supply 114 information to getters. 115 116 @throws IllegalArgumentException if {@code compositeData} 117 is null. 118 */ 119 public CompositeDataInvocationHandler(CompositeData compositeData) { 120 this(compositeData, null); 121 } 122 123 /** 124 <p>Construct a handler backed by the given {@code 125 CompositeData}.</p> 126 127 @param compositeData the {@code CompositeData} that will supply 128 information to getters. 129 130 @throws IllegalArgumentException if {@code compositeData} 131 is null. 132 */ 133 CompositeDataInvocationHandler(CompositeData compositeData, 134 MXBeanLookup lookup) { 135 if (compositeData == null) 136 throw new IllegalArgumentException("compositeData"); 137 this.compositeData = compositeData; 138 this.lookup = lookup; 139 } 140 141 /** 142 Return the {@code CompositeData} that was supplied to the 143 constructor. 144 @return the {@code CompositeData} that this handler is backed 145 by. This is never null. 146 */ |