MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / MBean

Method MBean

java/src/org/openqa/selenium/grid/jmx/MBean.java:90–114  ·  view source on GitHub ↗
(Object bean)

Source from the content-addressed store, hash-verified

88 }
89
90 MBean(Object bean) {
91 this.bean = bean;
92
93 ManagedService mBean = bean.getClass().getAnnotation(ManagedService.class);
94 if (mBean == null) {
95 throw new IllegalArgumentException(
96 String.format("%s has no @ManagedService annotation", bean.getClass().getName()));
97 }
98
99 String name = bean.getClass().getName();
100 String description = mBean.description();
101 collectAttributeInfo(bean);
102 @Nullable MBeanAttributeInfo[] attributes =
103 attributeMap.values().stream()
104 .map(AttributeInfo::getMBeanAttributeInfo)
105 .toArray(MBeanAttributeInfo[]::new);
106 collectOperationInfo(bean);
107 MBeanOperationInfo[] operations =
108 operationMap.values().stream()
109 .map(OperationInfo::getMBeanOperationInfo)
110 .toArray(MBeanOperationInfo[]::new);
111
112 beanInfo = new MBeanInfo(name, description, attributes, null, operations, null);
113 objectName = generateObjectName(bean);
114 }
115
116 private void collectAttributeInfo(Object bean) {
117 Stream.of(bean.getClass().getMethods())

Callers

nothing calls this directly

Calls 11

collectAttributeInfoMethod · 0.95
collectOperationInfoMethod · 0.95
generateObjectNameMethod · 0.95
toArrayMethod · 0.80
valuesMethod · 0.80
getClassMethod · 0.65
getNameMethod · 0.65
formatMethod · 0.45
descriptionMethod · 0.45
mapMethod · 0.45
streamMethod · 0.45

Tested by

no test coverage detected