本文整理汇总了Java中com.sun.jdi.ClassType.superclass方法的典型用法代码示例。如果您正苦于以下问题:Java ClassType.superclass方法的具体用法?Java ClassType.superclass怎么用?Java ClassType.superclass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.ClassType
的用法示例。
在下文中一共展示了ClassType.superclass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: allMethods
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
/**
* Shared implementation of {@linkplain ClassType#allMethods()} and
* {@linkplain InterfaceType#allMethods()}
* @return A list of all methods (recursively)
*/
public final List<Method> allMethods() {
ArrayList<Method> list = new ArrayList<>(methods());
ClassType clazz = superclass();
while (clazz != null) {
list.addAll(clazz.methods());
clazz = clazz.superclass();
}
/*
* Avoid duplicate checking on each method by iterating through
* duplicate-free allInterfaces() rather than recursing
*/
for (InterfaceType interfaze : getAllInterfaces()) {
list.addAll(interfaze.methods());
}
return list;
}
示例2: handleClassLoad
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
private void handleClassLoad(final ClassType classType, final ThreadReference thread)
{
// do not proceed if this part of the hierarchy has been processed
if (contourFactory().lookupStaticContour(classType.name()) == null)
{
// update the meta-data for this type and all other types in its file
resolveType(classType);
// handle the super class
final ClassType superClass = classType.superclass();
// if a class is in-model, all its ancestors must be in-model so that the proper static
// contours and their members exist
if (superClass != null)
{
handleClassLoad(superClass, thread);
}
// Only static and top-level types have static contours, *including* nested static types.
if (classType.isStatic() || !isNestedType(classType))
{
// creates and dispatches a type load event for this type
manager().jiveDispatcher().dispatchLoadEvent(classType, thread);
}
}
}
示例3: getAllMethods
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
List getAllMethods() {
ArrayList list = new ArrayList(methods());
ClassType clazz = superclass();
while (clazz != null) {
list.addAll(clazz.methods());
clazz = clazz.superclass();
}
/*
* Avoid duplicate checking on each method by iterating through
* duplicate-free allInterfaces() rather than recursing
*/
Iterator iter = allInterfaces().iterator();
while (iter.hasNext()) {
InterfaceType interfaze = (InterfaceType)iter.next();
list.addAll(interfaze.methods());
}
return list;
}
示例4: isAssignable
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
private static boolean isAssignable(ClassType ct1, ClassType ct2) {
// return ct1.isAssignableFrom(ct2)
if (ct1.equals(ct2)) {
return true;
}
ClassType cts = ct2.superclass();
if (cts != null) {
return isAssignable(ct1, cts);
} else {
return false;
}
}
示例5: isInstanceOfClass
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
private static boolean isInstanceOfClass(ClassType c1, ClassType c2) {
if (c1.equals(c2)) {
return true;
}
c1 = c1.superclass();
if (c1 == null) {
return false;
}
return isInstanceOfClass(c1, c2);
}
示例6: isInstanceOfClass
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
protected static boolean isInstanceOfClass(ClassType c1, ClassType c2) {
if (c1.equals(c2)) {
return true;
}
c1 = c1.superclass();
if (c1 == null) {
return false;
}
return isInstanceOfClass(c1, c2);
}
示例7: subclasses
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
public List<ClassType> subclasses() {
List<ClassType> subs = new ArrayList<>();
for (ReferenceType refType : vm.allClasses()) {
if (refType instanceof ClassType) {
ClassType clazz = (ClassType)refType;
ClassType superclass = clazz.superclass();
if ((superclass != null) && superclass.equals(this)) {
subs.add((ClassType)refType);
}
}
}
return subs;
}
示例8: jdiTypeLoadClass
import com.sun.jdi.ClassType; //导入方法依赖的package包/类
public void jdiTypeLoadClass(final ClassType type)
{
final ClassType superClass = type.superclass();
if (superClass != null)
{
jdiTypeLoad(superClass);
}
for (final InterfaceType superInterface : type.interfaces())
{
jdiTypeLoad(superInterface);
}
jdiTypeLoadComplete(type);
}