@Override
public final TabularData getCacheContents() throws OpenDataException {
final CompositeType cacheEntryType = getCacheEntryType();
final TabularDataSupport tabularData = new TabularDataSupport(
new TabularType("Cache Entries", "Cache Entries", cacheEntryType, new String[] { "Cache Key" }));
ConcurrentMap<K, V> cacheAsMap = getCache().asMap();
for (final Map.Entry<K, V> entry : cacheAsMap.entrySet()) {
final Map<String, Object> data = new HashMap<String, Object>();
data.put("Cache Key", entry.getKey().toString());
V cacheObj = entry.getValue();
if (cacheObj != null) {
addCacheData(data, cacheObj);
}
tabularData.put(new CompositeDataSupport(cacheEntryType, data));
}
return tabularData;
}
java类javax.management.openmbean.TabularType的实例源码
AbstractGuavaCacheMBean.java 文件源码
项目:acs-aem-commons
阅读 29
收藏 0
点赞 0
评论 0
DefaultMXBeanMappingFactory.java 文件源码
项目:OpenJSharp
阅读 28
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
BaseOpenMBean.java 文件源码
项目:ChronoBike
阅读 29
收藏 0
点赞 0
评论 0
protected void addOpenAttribute(String csDescription, Class cls, String csMethodName, TabularType tabularType)
{
Method methodGet = MethodFinder.getMethod(cls, "get"+csMethodName);
boolean bCanGet = true;
if(methodGet == null)
bCanGet = false;
Method methodSet = MethodFinder.getMethod(cls, "set"+csMethodName, CompositeData.class);
boolean bCanSet = true;
if(methodSet == null)
bCanSet = false;
OpenMBeanAttributeInfoSupport attrOpen = new OpenMBeanAttributeInfoSupport(csMethodName, csDescription, tabularType, bCanGet, bCanSet, false);
OpenMBeanAttributeInfoWrapper attr = new OpenMBeanAttributeInfoWrapper(csMethodName, csDescription, attrOpen, methodGet, methodSet);
if(m_arrOpenMBeanAttributeInfosWrapper == null)
m_arrOpenMBeanAttributeInfosWrapper = new ArrayList<OpenMBeanAttributeInfoWrapper>();
m_arrOpenMBeanAttributeInfosWrapper.add(attr);
}
LazyCompositeData.java 文件源码
项目:jdk8u-jdk
阅读 31
收藏 0
点赞 0
评论 0
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
if (ot1 instanceof CompositeType) {
if (! (ot2 instanceof CompositeType))
return false;
if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
return false;
} else if (ot1 instanceof TabularType) {
if (! (ot2 instanceof TabularType))
return false;
if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
return false;
} else if (ot1 instanceof ArrayType) {
if (! (ot2 instanceof ArrayType))
return false;
if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
return false;
}
} else if (!ot1.equals(ot2)) {
return false;
}
return true;
}
DefaultMXBeanMappingFactory.java 文件源码
项目:jdk8u-jdk
阅读 28
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:jdk8u-jdk
阅读 32
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
LazyCompositeData.java 文件源码
项目:openjdk-jdk10
阅读 36
收藏 0
点赞 0
评论 0
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
if (ot1 instanceof CompositeType) {
if (! (ot2 instanceof CompositeType))
return false;
if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
return false;
} else if (ot1 instanceof TabularType) {
if (! (ot2 instanceof TabularType))
return false;
if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
return false;
} else if (ot1 instanceof ArrayType) {
if (! (ot2 instanceof ArrayType))
return false;
if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
return false;
}
} else if (!ot1.equals(ot2)) {
return false;
}
return true;
}
DefaultMXBeanMappingFactory.java 文件源码
项目:openjdk-jdk10
阅读 29
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:openjdk-jdk10
阅读 30
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
LazyCompositeData.java 文件源码
项目:openjdk9
阅读 42
收藏 0
点赞 0
评论 0
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
if (ot1 instanceof CompositeType) {
if (! (ot2 instanceof CompositeType))
return false;
if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
return false;
} else if (ot1 instanceof TabularType) {
if (! (ot2 instanceof TabularType))
return false;
if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
return false;
} else if (ot1 instanceof ArrayType) {
if (! (ot2 instanceof ArrayType))
return false;
if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
return false;
}
} else if (!ot1.equals(ot2)) {
return false;
}
return true;
}
DefaultMXBeanMappingFactory.java 文件源码
项目:openjdk9
阅读 26
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:openjdk9
阅读 30
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
LazyCompositeData.java 文件源码
项目:jdk8u_jdk
阅读 29
收藏 0
点赞 0
评论 0
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
if (ot1 instanceof CompositeType) {
if (! (ot2 instanceof CompositeType))
return false;
if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
return false;
} else if (ot1 instanceof TabularType) {
if (! (ot2 instanceof TabularType))
return false;
if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
return false;
} else if (ot1 instanceof ArrayType) {
if (! (ot2 instanceof ArrayType))
return false;
if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
return false;
}
} else if (!ot1.equals(ot2)) {
return false;
}
return true;
}
DefaultMXBeanMappingFactory.java 文件源码
项目:jdk8u_jdk
阅读 30
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:jdk8u_jdk
阅读 48
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
LazyCompositeData.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 31
收藏 0
点赞 0
评论 0
private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
if (ot1 instanceof CompositeType) {
if (! (ot2 instanceof CompositeType))
return false;
if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
return false;
} else if (ot1 instanceof TabularType) {
if (! (ot2 instanceof TabularType))
return false;
if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
return false;
} else if (ot1 instanceof ArrayType) {
if (! (ot2 instanceof ArrayType))
return false;
if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
return false;
}
} else if (!ot1.equals(ot2)) {
return false;
}
return true;
}
DefaultMXBeanMappingFactory.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 37
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 29
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
APIStatisticsOpenMBean.java 文件源码
项目:discoursedb-core
阅读 32
收藏 0
点赞 0
评论 0
public APIStatisticsOpenMBean(APIStatistics apiStatistics) {
API_STATISTICS = apiStatistics;
try {
METHOD_STATS_TYPE =
new CompositeType("method statistics", "method statistics",
ITEM_NAMES, ITEM_DESCRIPTIONS, ITEM_TYPES);
String[] index = {"methodName"};
API_STATISTICS_TYPE = new TabularType("API statistics",
"list of methods",
METHOD_STATS_TYPE,
index);
} catch (OpenDataException e) {
throw new RuntimeException(e);
}
}
FailureDetector.java 文件源码
项目:scylla-jmx
阅读 31
收藏 0
点赞 0
评论 0
@Override
public TabularData getPhiValues() throws OpenDataException {
final CompositeType ct = new CompositeType("Node", "Node", new String[] { "Endpoint", "PHI" },
new String[] { "IP of the endpoint", "PHI value" },
new OpenType[] { SimpleType.STRING, SimpleType.DOUBLE });
final TabularDataSupport results = new TabularDataSupport(
new TabularType("PhiList", "PhiList", ct, new String[] { "Endpoint" }));
final JsonArray arr = client.getJsonArray("/failure_detector/endpoint_phi_values");
for (JsonValue v : arr) {
JsonObject o = (JsonObject) v;
String endpoint = o.getString("endpoint");
double phi = Double.parseDouble(o.getString("phi"));
if (phi != Double.MIN_VALUE) {
// returned values are scaled by PHI_FACTOR so that the are on
// the same scale as PhiConvictThreshold
final CompositeData data = new CompositeDataSupport(ct, new String[] { "Endpoint", "PHI" },
new Object[] { endpoint, phi * PHI_FACTOR });
results.put(data);
}
}
return results;
}
JmxInProgressMonitor.java 文件源码
项目:parfait
阅读 31
收藏 0
点赞 0
评论 0
@Override
public TabularData apply(InProgressSnapshot from) {
List<OpenType<?>> types = Lists.transform(from.getColumnClasses(), CLASS_TO_OPENTYPE);
CompositeType rowType;
try {
int columnCount = from.getColumnCount();
rowType = new CompositeType("Snapshot row", "Snapshot row", from.getColumnNames()
.toArray(new String[columnCount]), from.getColumnDescriptions().toArray(
new String[columnCount]), types.toArray(new OpenType<?>[columnCount]));
TabularType type = new TabularType("Snapshot", "Snapshot", rowType,
new String[] { "Thread name" });
TabularData data = new TabularDataSupport(type);
for (Map<String, Object> dataRow : from.getValues()) {
CompositeData row = new CompositeDataSupport(rowType, dataRow);
data.put(row);
}
return data;
} catch (OpenDataException e) {
throw new RuntimeException(e);
}
}
DefaultMXBeanMappingFactory.java 文件源码
项目:infobip-open-jdk-8
阅读 28
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:infobip-open-jdk-8
阅读 39
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
DefaultMXBeanMappingFactory.java 文件源码
项目:jdk8u-dev-jdk
阅读 39
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:jdk8u-dev-jdk
阅读 32
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
DefaultMXBeanMappingFactory.java 文件源码
项目:jdk7-jdk
阅读 35
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:jdk7-jdk
阅读 34
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
DefaultMXBeanMappingFactory.java 文件源码
项目:openjdk-source-code-learn
阅读 28
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}
MXBeanTest.java 文件源码
项目:openjdk-source-code-learn
阅读 28
收藏 0
点赞 0
评论 0
private static void compareTabularType(TabularType t1, TabularType t2) {
if (t1.equals(t2)) {
System.out.println("same tabular type");
return;
}
if (t1.getClassName().equals(t2.getClassName()))
System.out.println("same class name");
if (t1.getDescription().equals(t2.getDescription()))
System.out.println("same description");
else {
System.out.println("t1 description: " + t1.getDescription());
System.out.println("t2 description: " + t2.getDescription());
}
if (t1.getIndexNames().equals(t2.getIndexNames()))
System.out.println("same index names");
if (t1.getRowType().equals(t2.getRowType()))
System.out.println("same row type");
}
DefaultMXBeanMappingFactory.java 文件源码
项目:OLD-OpenJDK8
阅读 31
收藏 0
点赞 0
评论 0
private MXBeanMapping
makeTabularMapping(Type objType, boolean sortedMap,
Type keyType, Type valueType,
MXBeanMappingFactory factory)
throws OpenDataException {
final String objTypeName = typeName(objType);
final MXBeanMapping keyMapping = factory.mappingForType(keyType, factory);
final MXBeanMapping valueMapping = factory.mappingForType(valueType, factory);
final OpenType<?> keyOpenType = keyMapping.getOpenType();
final OpenType<?> valueOpenType = valueMapping.getOpenType();
final CompositeType rowType =
new CompositeType(objTypeName,
objTypeName,
keyValueArray,
keyValueArray,
new OpenType<?>[] {keyOpenType, valueOpenType});
final TabularType tabularType =
new TabularType(objTypeName, objTypeName, rowType, keyArray);
return new TabularMapping(objType, sortedMap, tabularType,
keyMapping, valueMapping);
}