public abstract class org.springframework.jmx.support.JmxUtils
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: org.springframework.jmx.support.JmxUtils
super_class: java.lang.Object
{
public static final java.lang.String IDENTITY_OBJECT_NAME_KEY;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "identity"
private static final java.lang.String MBEAN_SUFFIX;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "MBean"
private static final org.apache.commons.logging.Log logger;
descriptor: Lorg/apache/commons/logging/Log;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/springframework/jmx/support/JmxUtils;
invokestatic org.apache.commons.logging.LogFactory.getLog:(Ljava/lang/Class;)Lorg/apache/commons/logging/Log;
putstatic org.springframework.jmx.support.JmxUtils.logger:Lorg/apache/commons/logging/Log;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/jmx/support/JmxUtils;
public static javax.management.MBeanServer locateMBeanServer();
descriptor: ()Ljavax/management/MBeanServer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: aconst_null
invokestatic org.springframework.jmx.support.JmxUtils.locateMBeanServer:(Ljava/lang/String;)Ljavax/management/MBeanServer;
areturn
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws org.springframework.jmx.MBeanServerNotFoundException
public static javax.management.MBeanServer locateMBeanServer(java.lang.String);
descriptor: (Ljava/lang/String;)Ljavax/management/MBeanServer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: ldc ""
aload 0
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 12
2: aload 0
invokestatic javax.management.MBeanServerFactory.findMBeanServer:(Ljava/lang/String;)Ljava/util/ArrayList;
astore 2
start local 2 3: aload 2
invokestatic org.springframework.util.CollectionUtils.isEmpty:(Ljava/util/Collection;)Z
ifne 12
4: aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmple 11
getstatic org.springframework.jmx.support.JmxUtils.logger:Lorg/apache/commons/logging/Log;
invokeinterface org.apache.commons.logging.Log.isInfoEnabled:()Z
ifeq 11
5: getstatic org.springframework.jmx.support.JmxUtils.logger:Lorg/apache/commons/logging/Log;
new java.lang.StringBuilder
dup
ldc "Found more than one MBeanServer instance"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
6: aload 0
ifnull 7
new java.lang.StringBuilder
dup
ldc " with agent id ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
goto 8
StackMap locals: java.lang.String javax.management.MBeanServer java.util.List
StackMap stack: org.apache.commons.logging.Log java.lang.StringBuilder
7: ldc ""
StackMap locals: java.lang.String javax.management.MBeanServer java.util.List
StackMap stack: org.apache.commons.logging.Log java.lang.StringBuilder java.lang.String
8: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
9: ldc ". Returning first from list."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
10: invokeinterface org.apache.commons.logging.Log.info:(Ljava/lang/Object;)V
11: StackMap locals:
StackMap stack:
aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast javax.management.MBeanServer
astore 1
end local 2 12: StackMap locals:
StackMap stack:
aload 1
ifnonnull 19
aload 0
invokestatic org.springframework.util.StringUtils.hasLength:(Ljava/lang/String;)Z
ifne 19
13: invokestatic java.lang.management.ManagementFactory.getPlatformMBeanServer:()Ljavax/management/MBeanServer;
astore 1
14: goto 19
15: StackMap locals:
StackMap stack: java.lang.SecurityException
astore 2
start local 2 16: new org.springframework.jmx.MBeanServerNotFoundException
dup
ldc "No specific MBeanServer found, and not allowed to obtain the Java platform MBeanServer"
17: aload 2
18: invokespecial org.springframework.jmx.MBeanServerNotFoundException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 19: StackMap locals:
StackMap stack:
aload 1
ifnonnull 27
20: new org.springframework.jmx.MBeanServerNotFoundException
dup
21: new java.lang.StringBuilder
dup
ldc "Unable to locate an MBeanServer instance"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
22: aload 0
ifnull 23
new java.lang.StringBuilder
dup
ldc " with agent id ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
goto 24
StackMap locals: java.lang.String javax.management.MBeanServer
StackMap stack: new 20 new 20 java.lang.StringBuilder
23: ldc ""
StackMap locals: java.lang.String javax.management.MBeanServer
StackMap stack: new 20 new 20 java.lang.StringBuilder java.lang.String
24: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
25: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
26: invokespecial org.springframework.jmx.MBeanServerNotFoundException.<init>:(Ljava/lang/String;)V
athrow
27: StackMap locals:
StackMap stack:
getstatic org.springframework.jmx.support.JmxUtils.logger:Lorg/apache/commons/logging/Log;
invokeinterface org.apache.commons.logging.Log.isDebugEnabled:()Z
ifeq 29
28: getstatic org.springframework.jmx.support.JmxUtils.logger:Lorg/apache/commons/logging/Log;
new java.lang.StringBuilder
dup
ldc "Found MBeanServer: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface org.apache.commons.logging.Log.debug:(Ljava/lang/Object;)V
29: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 agentId Ljava/lang/String;
1 30 1 server Ljavax/management/MBeanServer;
3 12 2 servers Ljava/util/List<Ljavax/management/MBeanServer;>;
16 19 2 ex Ljava/lang/SecurityException;
Exception table:
from to target type
13 14 15 Class java.lang.SecurityException
Exceptions:
throws org.springframework.jmx.MBeanServerNotFoundException
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
agentId
public static java.lang.Class<?>[] parameterInfoToTypes(javax.management.MBeanParameterInfo[]);
descriptor: ([Ljavax/management/MBeanParameterInfo;)[Ljava/lang/Class;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic org.springframework.util.ClassUtils.getDefaultClassLoader:()Ljava/lang/ClassLoader;
invokestatic org.springframework.jmx.support.JmxUtils.parameterInfoToTypes:([Ljavax/management/MBeanParameterInfo;Ljava/lang/ClassLoader;)[Ljava/lang/Class;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 paramInfo [Ljavax/management/MBeanParameterInfo;
Exceptions:
throws java.lang.ClassNotFoundException
Signature: ([Ljavax/management/MBeanParameterInfo;)[Ljava/lang/Class<*>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
paramInfo
public static java.lang.Class<?>[] parameterInfoToTypes(javax.management.MBeanParameterInfo[], java.lang.ClassLoader);
descriptor: ([Ljavax/management/MBeanParameterInfo;Ljava/lang/ClassLoader;)[Ljava/lang/Class;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 0
ifnull 8
aload 0
arraylength
ifle 8
2: aload 0
arraylength
anewarray java.lang.Class
astore 2
3: iconst_0
istore 3
start local 3 4: goto 7
5: StackMap locals: java.lang.Class[] int
StackMap stack:
aload 2
iload 3
aload 0
iload 3
aaload
invokevirtual javax.management.MBeanParameterInfo.getType:()Ljava/lang/String;
aload 1
invokestatic org.springframework.util.ClassUtils.forName:(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;
aastore
6: iinc 3 1
StackMap locals:
StackMap stack:
7: iload 3
aload 0
arraylength
if_icmplt 5
end local 3 8: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 paramInfo [Ljavax/management/MBeanParameterInfo;
0 9 1 classLoader Ljava/lang/ClassLoader;
1 9 2 types [Ljava/lang/Class;
4 8 3 x I
Exceptions:
throws java.lang.ClassNotFoundException
Signature: ([Ljavax/management/MBeanParameterInfo;Ljava/lang/ClassLoader;)[Ljava/lang/Class<*>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
1:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
paramInfo
classLoader
public static java.lang.String[] getMethodSignature(java.lang.reflect.Method);
descriptor: (Ljava/lang/reflect/Method;)[Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.reflect.Method.getParameterTypes:()[Ljava/lang/Class;
astore 1
start local 1 1: aload 1
arraylength
anewarray java.lang.String
astore 2
start local 2 2: iconst_0
istore 3
start local 3 3: goto 6
4: StackMap locals: java.lang.Class[] java.lang.String[] int
StackMap stack:
aload 2
iload 3
aload 1
iload 3
aaload
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
aastore
5: iinc 3 1
StackMap locals:
StackMap stack:
6: iload 3
aload 1
arraylength
if_icmplt 4
end local 3 7: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 method Ljava/lang/reflect/Method;
1 8 1 types [Ljava/lang/Class;
2 8 2 signature [Ljava/lang/String;
3 7 3 x I
MethodParameters:
Name Flags
method
public static java.lang.String getAttributeName(java.beans.PropertyDescriptor, boolean);
descriptor: (Ljava/beans/PropertyDescriptor;Z)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: iload 1
ifeq 2
1: aload 0
invokevirtual java.beans.PropertyDescriptor.getName:()Ljava/lang/String;
invokestatic org.springframework.util.StringUtils.capitalize:(Ljava/lang/String;)Ljava/lang/String;
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.beans.PropertyDescriptor.getName:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 property Ljava/beans/PropertyDescriptor;
0 3 1 useStrictCasing Z
MethodParameters:
Name Flags
property
useStrictCasing
public static javax.management.ObjectName appendIdentityToObjectName(javax.management.ObjectName, java.lang.Object);
descriptor: (Ljavax/management/ObjectName;Ljava/lang/Object;)Ljavax/management/ObjectName;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual javax.management.ObjectName.getKeyPropertyList:()Ljava/util/Hashtable;
astore 2
start local 2 1: aload 2
ldc "identity"
aload 1
invokestatic org.springframework.util.ObjectUtils.getIdentityHexString:(Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
invokevirtual javax.management.ObjectName.getDomain:()Ljava/lang/String;
aload 2
invokestatic org.springframework.jmx.support.ObjectNameManager.getInstance:(Ljava/lang/String;Ljava/util/Hashtable;)Ljavax/management/ObjectName;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 objectName Ljavax/management/ObjectName;
0 3 1 managedResource Ljava/lang/Object;
1 3 2 keyProperties Ljava/util/Hashtable<Ljava/lang/String;Ljava/lang/String;>;
Exceptions:
throws javax.management.MalformedObjectNameException
MethodParameters:
Name Flags
objectName
managedResource
public static java.lang.Class<?> getClassToExpose();
descriptor: (Ljava/lang/Object;)Ljava/lang/Class;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic org.springframework.util.ClassUtils.getUserClass:(Ljava/lang/Object;)Ljava/lang/Class;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 managedBean Ljava/lang/Object;
Signature: (Ljava/lang/Object;)Ljava/lang/Class<*>;
MethodParameters:
Name Flags
managedBean
public static java.lang.Class<?> getClassToExpose(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljava/lang/Class;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic org.springframework.util.ClassUtils.getUserClass:(Ljava/lang/Class;)Ljava/lang/Class;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 clazz Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)Ljava/lang/Class<*>;
MethodParameters:
Name Flags
clazz
public static boolean isMBean(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ifnull 4
1: ldc Ljavax/management/DynamicMBean;
aload 0
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifne 3
2: aload 0
invokestatic org.springframework.jmx.support.JmxUtils.getMBeanInterface:(Ljava/lang/Class;)Ljava/lang/Class;
ifnonnull 3
aload 0
invokestatic org.springframework.jmx.support.JmxUtils.getMXBeanInterface:(Ljava/lang/Class;)Ljava/lang/Class;
ifnull 4
3: StackMap locals:
StackMap stack:
iconst_1
ireturn
StackMap locals:
StackMap stack:
4: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 clazz Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)Z
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
clazz
public static java.lang.Class<?> getMBeanInterface(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljava/lang/Class;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=7, args_size=1
start local 0 0: aload 0
ifnull 1
aload 0
invokevirtual java.lang.Class.getSuperclass:()Ljava/lang/Class;
ifnonnull 2
1: StackMap locals:
StackMap stack:
aconst_null
areturn
2: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
aload 0
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "MBean"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 3: aload 0
invokevirtual java.lang.Class.getInterfaces:()[Ljava/lang/Class;
astore 2
start local 2 4: aload 2
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 9
StackMap locals: java.lang.Class java.lang.String java.lang.Class[] top int int java.lang.Class[]
StackMap stack:
5: aload 6
iload 4
aaload
astore 3
start local 3 6: aload 3
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
aload 1
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 8
7: aload 3
areturn
end local 3 8: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
9: iload 4
iload 5
if_icmplt 5
10: aload 0
invokevirtual java.lang.Class.getSuperclass:()Ljava/lang/Class;
invokestatic org.springframework.jmx.support.JmxUtils.getMBeanInterface:(Ljava/lang/Class;)Ljava/lang/Class;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 clazz Ljava/lang/Class<*>;
3 11 1 mbeanInterfaceName Ljava/lang/String;
4 11 2 implementedInterfaces [Ljava/lang/Class;
6 8 3 iface Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)Ljava/lang/Class<*>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
clazz
public static java.lang.Class<?> getMXBeanInterface(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljava/lang/Class;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=6, args_size=1
start local 0 0: aload 0
ifnull 1
aload 0
invokevirtual java.lang.Class.getSuperclass:()Ljava/lang/Class;
ifnonnull 2
1: StackMap locals:
StackMap stack:
aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Class.getInterfaces:()[Ljava/lang/Class;
astore 1
start local 1 3: aload 1
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 8
StackMap locals: java.lang.Class java.lang.Class[] top int int java.lang.Class[]
StackMap stack:
4: aload 5
iload 3
aaload
astore 2
start local 2 5: aload 2
invokestatic javax.management.JMX.isMXBeanInterface:(Ljava/lang/Class;)Z
ifeq 7
6: aload 2
areturn
end local 2 7: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
8: iload 3
iload 4
if_icmplt 4
9: aload 0
invokevirtual java.lang.Class.getSuperclass:()Ljava/lang/Class;
invokestatic org.springframework.jmx.support.JmxUtils.getMXBeanInterface:(Ljava/lang/Class;)Ljava/lang/Class;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 clazz Ljava/lang/Class<*>;
3 10 1 implementedInterfaces [Ljava/lang/Class;
5 7 2 iface Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)Ljava/lang/Class<*>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
clazz
}
SourceFile: "JmxUtils.java"