private static MBeanConstructorInfo[]
constructorArray(OpenMBeanConstructorInfo[] src) {
if (src == null)
return null;
MBeanConstructorInfo[] dst = new MBeanConstructorInfo[src.length];
System.arraycopy(src, 0, dst, 0, src.length);
// may throw an ArrayStoreException
return dst;
}
java类javax.management.MBeanConstructorInfo的实例源码
OpenMBeanInfoSupport.java 文件源码
项目:OpenJSharp
阅读 17
收藏 0
点赞 0
评论 0
MBeanIntrospector.java 文件源码
项目:jdk8u-jdk
阅读 19
收藏 0
点赞 0
评论 0
private static MBeanConstructorInfo[] findConstructors(Class<?> c) {
Constructor<?>[] cons = c.getConstructors();
MBeanConstructorInfo[] mbc = new MBeanConstructorInfo[cons.length];
for (int i = 0; i < cons.length; i++) {
final String descr = "Public constructor of the MBean";
mbc[i] = new MBeanConstructorInfo(descr, cons[i]);
}
return mbc;
}
ModelMBeanInfoSupport.java 文件源码
项目:jdk8u-jdk
阅读 23
收藏 0
点赞 0
评论 0
/**
* Returns the ModelMBeanConstructorInfo requested by name.
* If no ModelMBeanConstructorInfo exists for this name null is returned.
*
* @param inName the name of the constructor.
*
* @return the constructor info for the named constructor, or null
* if there is none.
*
* @exception MBeanException Wraps a distributed communication Exception.
* @exception RuntimeOperationsException Wraps an IllegalArgumentException
* for a null constructor name.
*/
public ModelMBeanConstructorInfo getConstructor(String inName)
throws MBeanException, RuntimeOperationsException {
ModelMBeanConstructorInfo retInfo = null;
if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
MODELMBEAN_LOGGER.logp(Level.FINER,
ModelMBeanInfoSupport.class.getName(),
"getConstructor(String)", "Entry");
}
if (inName == null) {
throw new RuntimeOperationsException(
new IllegalArgumentException("Constructor name is null"),
"Exception occurred trying to get the " +
"ModelMBeanConstructorInfo of the MBean");
}
MBeanConstructorInfo[] consList = modelMBeanConstructors; //this.getConstructors();
int numCons = 0;
if (consList != null) numCons = consList.length;
for (int i=0; (i < numCons) && (retInfo == null); i++) {
if (inName.equals(consList[i].getName())) {
retInfo = ((ModelMBeanConstructorInfo) consList[i].clone());
}
}
if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
MODELMBEAN_LOGGER.logp(Level.FINER,
ModelMBeanInfoSupport.class.getName(),
"getConstructor(String)", "Exit");
}
return retInfo;
}
ModelMBeanInfoSupport.java 文件源码
项目:jdk8u-jdk
阅读 23
收藏 0
点赞 0
评论 0
/**
* Deserializes a {@link ModelMBeanInfoSupport} from an {@link ObjectInputStream}.
*/
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
if (compat) {
// Read an object serialized in the old serial form
//
ObjectInputStream.GetField fields = in.readFields();
modelMBeanDescriptor =
(Descriptor) fields.get("modelMBeanDescriptor", null);
if (fields.defaulted("modelMBeanDescriptor")) {
throw new NullPointerException("modelMBeanDescriptor");
}
modelMBeanAttributes =
(MBeanAttributeInfo[]) fields.get("mmbAttributes", null);
if (fields.defaulted("mmbAttributes")) {
throw new NullPointerException("mmbAttributes");
}
modelMBeanConstructors =
(MBeanConstructorInfo[]) fields.get("mmbConstructors", null);
if (fields.defaulted("mmbConstructors")) {
throw new NullPointerException("mmbConstructors");
}
modelMBeanNotifications =
(MBeanNotificationInfo[]) fields.get("mmbNotifications", null);
if (fields.defaulted("mmbNotifications")) {
throw new NullPointerException("mmbNotifications");
}
modelMBeanOperations =
(MBeanOperationInfo[]) fields.get("mmbOperations", null);
if (fields.defaulted("mmbOperations")) {
throw new NullPointerException("mmbOperations");
}
} else {
// Read an object serialized in the new serial form
//
in.defaultReadObject();
}
}
OpenMBeanInfoSupport.java 文件源码
项目:jdk8u-jdk
阅读 16
收藏 0
点赞 0
评论 0
private static MBeanConstructorInfo[]
constructorArray(OpenMBeanConstructorInfo[] src) {
if (src == null)
return null;
MBeanConstructorInfo[] dst = new MBeanConstructorInfo[src.length];
System.arraycopy(src, 0, dst, 0, src.length);
// may throw an ArrayStoreException
return dst;
}
MustBeValidCommand.java 文件源码
项目:jdk8u-jdk
阅读 23
收藏 0
点赞 0
评论 0
static private MBeanConstructorInfo[] makeCtorInfos(String[][] spec) {
final MBeanConstructorInfo[] result =
new MBeanConstructorInfo[spec.length];
final MBeanParameterInfo[] pars = makeParInfos(parameters);
for (int i=0;i<result.length;i++) {
System.out.println("\tCreate an MBeanConstructorInfo: " +
spec[i][0]);
final MBeanConstructorInfo item =
new MBeanConstructorInfo(spec[i][1],spec[i][0],pars);
result[i]=item;
}
return result;
}
AnnotationTest.java 文件源码
项目:jdk8u-jdk
阅读 31
收藏 0
点赞 0
评论 0
private static void check(MBeanServer mbs, ObjectName on) throws Exception {
MBeanInfo mbi = mbs.getMBeanInfo(on);
// check the MBean itself
check(mbi);
// check attributes
MBeanAttributeInfo[] attrs = mbi.getAttributes();
for (MBeanAttributeInfo attr : attrs) {
check(attr);
if (attr.getName().equals("ReadOnly"))
check("@Full", attr.getDescriptor(), expectedFullDescriptor);
}
// check operations
MBeanOperationInfo[] ops = mbi.getOperations();
for (MBeanOperationInfo op : ops) {
check(op);
check(op.getSignature());
}
MBeanConstructorInfo[] constrs = mbi.getConstructors();
for (MBeanConstructorInfo constr : constrs) {
check(constr);
check(constr.getSignature());
}
}
MBeanIntrospector.java 文件源码
项目:openjdk-jdk10
阅读 23
收藏 0
点赞 0
评论 0
private static MBeanConstructorInfo[] findConstructors(Class<?> c) {
Constructor<?>[] cons = c.getConstructors();
MBeanConstructorInfo[] mbc = new MBeanConstructorInfo[cons.length];
for (int i = 0; i < cons.length; i++) {
final String descr = "Public constructor of the MBean";
mbc[i] = new MBeanConstructorInfo(descr, cons[i]);
}
return mbc;
}
ModelMBeanInfoSupport.java 文件源码
项目:openjdk-jdk10
阅读 21
收藏 0
点赞 0
评论 0
/**
* Returns the ModelMBeanConstructorInfo requested by name.
* If no ModelMBeanConstructorInfo exists for this name null is returned.
*
* @param inName the name of the constructor.
*
* @return the constructor info for the named constructor, or null
* if there is none.
*
* @exception MBeanException Wraps a distributed communication Exception.
* @exception RuntimeOperationsException Wraps an IllegalArgumentException
* for a null constructor name.
*/
public ModelMBeanConstructorInfo getConstructor(String inName)
throws MBeanException, RuntimeOperationsException {
ModelMBeanConstructorInfo retInfo = null;
if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
}
if (inName == null) {
throw new RuntimeOperationsException(
new IllegalArgumentException("Constructor name is null"),
"Exception occurred trying to get the " +
"ModelMBeanConstructorInfo of the MBean");
}
MBeanConstructorInfo[] consList = modelMBeanConstructors; //this.getConstructors();
int numCons = 0;
if (consList != null) numCons = consList.length;
for (int i=0; (i < numCons) && (retInfo == null); i++) {
if (inName.equals(consList[i].getName())) {
retInfo = ((ModelMBeanConstructorInfo) consList[i].clone());
}
}
if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
MODELMBEAN_LOGGER.log(Level.TRACE, "Exit");
}
return retInfo;
}
ModelMBeanInfoSupport.java 文件源码
项目:openjdk-jdk10
阅读 16
收藏 0
点赞 0
评论 0
/**
* Deserializes a {@link ModelMBeanInfoSupport} from an {@link ObjectInputStream}.
*/
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
if (compat) {
// Read an object serialized in the old serial form
//
ObjectInputStream.GetField fields = in.readFields();
modelMBeanDescriptor =
(Descriptor) fields.get("modelMBeanDescriptor", null);
if (fields.defaulted("modelMBeanDescriptor")) {
throw new NullPointerException("modelMBeanDescriptor");
}
modelMBeanAttributes =
(MBeanAttributeInfo[]) fields.get("mmbAttributes", null);
if (fields.defaulted("mmbAttributes")) {
throw new NullPointerException("mmbAttributes");
}
modelMBeanConstructors =
(MBeanConstructorInfo[]) fields.get("mmbConstructors", null);
if (fields.defaulted("mmbConstructors")) {
throw new NullPointerException("mmbConstructors");
}
modelMBeanNotifications =
(MBeanNotificationInfo[]) fields.get("mmbNotifications", null);
if (fields.defaulted("mmbNotifications")) {
throw new NullPointerException("mmbNotifications");
}
modelMBeanOperations =
(MBeanOperationInfo[]) fields.get("mmbOperations", null);
if (fields.defaulted("mmbOperations")) {
throw new NullPointerException("mmbOperations");
}
} else {
// Read an object serialized in the new serial form
//
in.defaultReadObject();
}
}