当前位置: 首页>>代码示例>>Java>>正文


Java ClassType.superclass方法代码示例

本文整理汇总了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;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:22,代码来源:InvokableTypeImpl.java

示例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);
    }
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:24,代码来源:JDIEventHandlerDelegate.java

示例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;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:19,代码来源:ClassTypeImpl.java

示例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;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:AWTGrabHandler.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:RemoteAWTScreenshot.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:JavaComponentInfo.java

示例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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:ClassTypeImpl.java

示例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);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:14,代码来源:EventHandlerLite.java


注:本文中的com.sun.jdi.ClassType.superclass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。