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


Java ClassDefinition.isInterface方法代码示例

本文整理汇总了Java中sun.tools.java.ClassDefinition.isInterface方法的典型用法代码示例。如果您正苦于以下问题:Java ClassDefinition.isInterface方法的具体用法?Java ClassDefinition.isInterface怎么用?Java ClassDefinition.isInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.tools.java.ClassDefinition的用法示例。


在下文中一共展示了ClassDefinition.isInterface方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: couldBeRemote

import sun.tools.java.ClassDefinition; //导入方法依赖的package包/类
private static boolean couldBeRemote (boolean quiet, ContextStack stack,
                                      ClassDefinition classDef) {

    boolean result = false;
    BatchEnvironment env = stack.getEnv();

    try {
        if (!classDef.isInterface()) {
            failedConstraint(16,quiet,stack,classDef.getName());
        } else {
            result = env.defRemote.implementedBy(env,classDef.getClassDeclaration());
            if (!result) failedConstraint(1,quiet,stack,classDef.getName());
        }
    } catch (ClassNotFound e) {
        classNotFound(stack,e);
    }

    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:RemoteType.java

示例2: couldBeAbstract

import sun.tools.java.ClassDefinition; //导入方法依赖的package包/类
private static boolean couldBeAbstract(ContextStack stack, ClassDefinition classDef,
                                       boolean quiet) {

    // Return true if interface and not remote...

    boolean result = false;

    if (classDef.isInterface()) {
        BatchEnvironment env = stack.getEnv();

        try {
            result = ! env.defRemote.implementedBy(env, classDef.getClassDeclaration());
            if (!result) failedConstraint(15,quiet,stack,classDef.getName());
        } catch (ClassNotFound e) {
            classNotFound(stack,e);
        }
    } else {
        failedConstraint(14,quiet,stack,classDef.getName());
    }


    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:AbstractType.java

示例3: ClassType

import sun.tools.java.ClassDefinition; //导入方法依赖的package包/类
/**
 * Create a ClassType instance for the given class. NOTE: This constructor
 * is ONLY for SpecialClassType.
 */
protected ClassType(ContextStack stack, int typeCode, ClassDefinition classDef) {
    super(stack,typeCode,classDef); // Call special parent constructor.
    if ((typeCode & TM_CLASS) == 0 && classDef.isInterface()) {
        throw new CompilerError("Not a class");
    }
    parent = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ClassType.java

示例4: InterfaceType

import sun.tools.java.ClassDefinition; //导入方法依赖的package包/类
/**
 * Create a InterfaceType instance for the given class. NOTE: This constructor
 * is ONLY for SpecialInterfaceType.
 */
protected InterfaceType(ContextStack stack, int typeCode, ClassDefinition classDef) {
    super(stack,typeCode,classDef); // Call special parent constructor.

    if ((typeCode & TM_INTERFACE) == 0 || ! classDef.isInterface()) {
        throw new CompilerError("Not an interface");
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:InterfaceType.java

示例5: getTopType

import sun.tools.java.ClassDefinition; //导入方法依赖的package包/类
/**
 * Create and return a top-level type.
 * @param cdef The top-level class definition.
 * @param stack The context stack.
 * @return The compound type or null if is non-conforming.
 */
protected CompoundType getTopType(ClassDefinition cdef, ContextStack stack) {

    CompoundType result = null;

    // Do we have an interface?

    if (cdef.isInterface()) {

        // Yes, so first try Abstract...

        result = AbstractType.forAbstract(cdef,stack,true);

        if (result == null) {

            // Then try Remote...

            result = RemoteType.forRemote(cdef,stack,false);
        }
    } else {

        // Not an interface, so try Implementation...

        result = ImplementationType.forImplementation(cdef,stack,false);
    }

    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:StubGenerator.java


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