本文整理汇总了Java中sun.management.MonitorInfoCompositeData.validateCompositeData方法的典型用法代码示例。如果您正苦于以下问题:Java MonitorInfoCompositeData.validateCompositeData方法的具体用法?Java MonitorInfoCompositeData.validateCompositeData怎么用?Java MonitorInfoCompositeData.validateCompositeData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.management.MonitorInfoCompositeData
的用法示例。
在下文中一共展示了MonitorInfoCompositeData.validateCompositeData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: from
import sun.management.MonitorInfoCompositeData; //导入方法依赖的package包/类
/**
* Returns a <tt>MonitorInfo</tt> object represented by the
* given <tt>CompositeData</tt>.
* The given <tt>CompositeData</tt> must contain the following attributes
* as well as the attributes specified in the
* <a href="LockInfo.html#MappedType">
* mapped type</a> for the {@link LockInfo} class:
* <blockquote>
* <table border summary="The attributes and their types the given CompositeData contains">
* <tr>
* <th align=left>Attribute Name</th>
* <th align=left>Type</th>
* </tr>
* <tr>
* <td>lockedStackFrame</td>
* <td><tt>CompositeData as specified in the
* <a href="ThreadInfo.html#StackTrace">stackTrace</a>
* attribute defined in the {@link ThreadInfo#from
* ThreadInfo.from} method.
* </tt></td>
* </tr>
* <tr>
* <td>lockedStackDepth</td>
* <td><tt>java.lang.Integer</tt></td>
* </tr>
* </table>
* </blockquote>
*
* @param cd <tt>CompositeData</tt> representing a <tt>MonitorInfo</tt>
*
* @throws IllegalArgumentException if <tt>cd</tt> does not
* represent a <tt>MonitorInfo</tt> with the attributes described
* above.
* @return a <tt>MonitorInfo</tt> object represented
* by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>;
* <tt>null</tt> otherwise.
*/
public static MonitorInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
if (cd instanceof MonitorInfoCompositeData) {
return ((MonitorInfoCompositeData) cd).getMonitorInfo();
} else {
MonitorInfoCompositeData.validateCompositeData(cd);
String className = MonitorInfoCompositeData.getClassName(cd);
int identityHashCode = MonitorInfoCompositeData.getIdentityHashCode(cd);
int stackDepth = MonitorInfoCompositeData.getLockedStackDepth(cd);
StackTraceElement stackFrame = MonitorInfoCompositeData.getLockedStackFrame(cd);
return new MonitorInfo(className,
identityHashCode,
stackDepth,
stackFrame);
}
}
示例2: from
import sun.management.MonitorInfoCompositeData; //导入方法依赖的package包/类
/**
* Returns a {@code MonitorInfo} object represented by the
* given {@code CompositeData}.
* The given {@code CompositeData} must contain the following attributes
* as well as the attributes specified in the
* <a href="LockInfo.html#MappedType">
* mapped type</a> for the {@link LockInfo} class:
* <table class="striped" style="margin-left:2em">
* <caption style="display:none">The attributes and their types the given CompositeData contains</caption>
* <thead>
* <tr>
* <th scope="col">Attribute Name</th>
* <th scope="col">Type</th>
* </tr>
* </thead>
* <tbody style="text-align:left">
* <tr>
* <th scope="row">lockedStackFrame</th>
* <td><code>CompositeData as specified in the
* <a href="ThreadInfo.html#StackTrace">stackTrace</a>
* attribute defined in the {@link ThreadInfo#from
* ThreadInfo.from} method.
* </code></td>
* </tr>
* <tr>
* <th scope="row">lockedStackDepth</th>
* <td>{@code java.lang.Integer}</td>
* </tr>
* </tbody>
* </table>
*
* @param cd {@code CompositeData} representing a {@code MonitorInfo}
*
* @throws IllegalArgumentException if {@code cd} does not
* represent a {@code MonitorInfo} with the attributes described
* above.
* @return a {@code MonitorInfo} object represented
* by {@code cd} if {@code cd} is not {@code null};
* {@code null} otherwise.
*/
public static MonitorInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
if (cd instanceof MonitorInfoCompositeData) {
return ((MonitorInfoCompositeData) cd).getMonitorInfo();
} else {
MonitorInfoCompositeData.validateCompositeData(cd);
String className = MonitorInfoCompositeData.getClassName(cd);
int identityHashCode = MonitorInfoCompositeData.getIdentityHashCode(cd);
int stackDepth = MonitorInfoCompositeData.getLockedStackDepth(cd);
StackTraceElement stackFrame = MonitorInfoCompositeData.getLockedStackFrame(cd);
return new MonitorInfo(className,
identityHashCode,
stackDepth,
stackFrame);
}
}
示例3: from
import sun.management.MonitorInfoCompositeData; //导入方法依赖的package包/类
/**
* Returns a {@code MonitorInfo} object represented by the
* given {@code CompositeData}.
* The given {@code CompositeData} must contain the following attributes
* as well as the attributes specified in the
* <a href="LockInfo.html#MappedType">
* mapped type</a> for the {@link LockInfo} class:
* <blockquote>
* <table border summary="The attributes and their types the given CompositeData contains">
* <tr>
* <th align=left>Attribute Name</th>
* <th align=left>Type</th>
* </tr>
* <tr>
* <td>lockedStackFrame</td>
* <td><code>CompositeData as specified in the
* <a href="ThreadInfo.html#StackTrace">stackTrace</a>
* attribute defined in the {@link ThreadInfo#from
* ThreadInfo.from} method.
* </code></td>
* </tr>
* <tr>
* <td>lockedStackDepth</td>
* <td>{@code java.lang.Integer}</td>
* </tr>
* </table>
* </blockquote>
*
* @param cd {@code CompositeData} representing a {@code MonitorInfo}
*
* @throws IllegalArgumentException if {@code cd} does not
* represent a {@code MonitorInfo} with the attributes described
* above.
* @return a {@code MonitorInfo} object represented
* by {@code cd} if {@code cd} is not {@code null};
* {@code null} otherwise.
*/
public static MonitorInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
if (cd instanceof MonitorInfoCompositeData) {
return ((MonitorInfoCompositeData) cd).getMonitorInfo();
} else {
MonitorInfoCompositeData.validateCompositeData(cd);
String className = MonitorInfoCompositeData.getClassName(cd);
int identityHashCode = MonitorInfoCompositeData.getIdentityHashCode(cd);
int stackDepth = MonitorInfoCompositeData.getLockedStackDepth(cd);
StackTraceElement stackFrame = MonitorInfoCompositeData.getLockedStackFrame(cd);
return new MonitorInfo(className,
identityHashCode,
stackDepth,
stackFrame);
}
}
示例4: from
import sun.management.MonitorInfoCompositeData; //导入方法依赖的package包/类
/**
* Returns a <tt>MonitorInfo</tt> object represented by the
* given <tt>CompositeData</tt>.
* The given <tt>CompositeData</tt> must contain the following attributes
* as well as the attributes specified in the
* <a href="LockInfo.html#MappedType">
* mapped type</a> for the {@link LockInfo} class:
* <blockquote>
* <table border>
* <tr>
* <th align=left>Attribute Name</th>
* <th align=left>Type</th>
* </tr>
* <tr>
* <td>lockedStackFrame</td>
* <td><tt>CompositeData as specified in the
* <a href="ThreadInfo.html#StackTrace">stackTrace</a>
* attribute defined in the {@link ThreadInfo#from
* ThreadInfo.from} method.
* </tt></td>
* </tr>
* <tr>
* <td>lockedStackDepth</td>
* <td><tt>java.lang.Integer</tt></td>
* </tr>
* </table>
* </blockquote>
*
* @param cd <tt>CompositeData</tt> representing a <tt>MonitorInfo</tt>
*
* @throws IllegalArgumentException if <tt>cd</tt> does not
* represent a <tt>MonitorInfo</tt> with the attributes described
* above.
* @return a <tt>MonitorInfo</tt> object represented
* by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>;
* <tt>null</tt> otherwise.
*/
public static MonitorInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
if (cd instanceof MonitorInfoCompositeData) {
return ((MonitorInfoCompositeData) cd).getMonitorInfo();
} else {
MonitorInfoCompositeData.validateCompositeData(cd);
String className = MonitorInfoCompositeData.getClassName(cd);
int identityHashCode = MonitorInfoCompositeData.getIdentityHashCode(cd);
int stackDepth = MonitorInfoCompositeData.getLockedStackDepth(cd);
StackTraceElement stackFrame = MonitorInfoCompositeData.getLockedStackFrame(cd);
return new MonitorInfo(className,
identityHashCode,
stackDepth,
stackFrame);
}
}
示例5: from
import sun.management.MonitorInfoCompositeData; //导入方法依赖的package包/类
/**
* Returns a <tt>MonitorInfo</tt> object represented by the
* given <tt>CompositeData</tt>.
* The given <tt>CompositeData</tt> must contain the following attributes
* as well as the attributes specified in the
* <a href="LockInfo.html#MappedType">
* mapped type</a> for the {@link LockInfo} class:
* <blockquote>
* <table border>
* <tr>
* <th align=left>Attribute Name</th>
* <th align=left>Type</th>
* </tr>
* <tr>
* <td>lockedStackFrame</td>
* <td><tt>CompositeData as specified in the
* <a href="ThreadInfo.html#StackTrace">stackTrace</a>
* attribute defined in the {@link ThreadInfo#from
* ThreadInfo.from} method.
* </tt></td>
* </tr>
* <tr>
* <td>lockedStackDepth</td>
* <td><tt>java.lang.Integer</tt></td>
* </tr>
* </table>
* </blockquote>
*
* @param cd <tt>CompositeData</tt> representing a <tt>MonitorInfo</tt>
*
* @throws IllegalArgumentException if <tt>cd</tt> does not
* represent a <tt>MonitorInfo</tt> with the attributes described
* above.
* @return a <tt>MonitorInfo</tt> object represented
* by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>;
* <tt>null</tt> otherwise.
*/
public static MonitorInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
if (cd instanceof MonitorInfoCompositeData) {
return ((MonitorInfoCompositeData) cd).getMonitorInfo();
} else {
MonitorInfoCompositeData.validateCompositeData(cd);
String className = MonitorInfoCompositeData.getClassName(cd);
int identityHashCode = MonitorInfoCompositeData.getIdentityHashCode(cd);
int stackDepth = MonitorInfoCompositeData.getLockedStackDepth(cd);
StackTraceElement stackFrame = MonitorInfoCompositeData.getLockedStackFrame(cd);
return new MonitorInfo(className,
identityHashCode,
stackDepth,
stackFrame);
}
}