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


Java Names.isJavaReservedWord方法代码示例

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


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

示例1: applyOperationNameCustomization

import com.sun.tools.internal.ws.processor.generator.Names; //导入方法依赖的package包/类
private boolean applyOperationNameCustomization() {
    JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.portTypeOperation, JAXWSBinding.class);
    String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
    if (operationName != null) {
        if (Names.isJavaReservedWord(operationName)) {
            if (options.isExtensionMode()) {
                warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
            } else {
                error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
            }
            return false;
        }

        info.operation.setCustomizedName(operationName);
    }

    if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) {
        if (options.isExtensionMode()) {
            warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
        } else {
            error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
        }
        return false;
    }
    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:WSDLModeler.java

示例2: applyOperationNameCustomization

import com.sun.tools.internal.ws.processor.generator.Names; //导入方法依赖的package包/类
private boolean applyOperationNameCustomization() {
    JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.portTypeOperation, JAXWSBinding.class);
    String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
    if (operationName != null) {
        if (Names.isJavaReservedWord(operationName)) {
            if (options.isExtensionMode())
                warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
            else
                error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
            return false;
        }

        info.operation.setCustomizedName(operationName);
    }

    if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) {
        if (options.isExtensionMode())
            warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
        else
            error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
        return false;
    }
    return true;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:25,代码来源:WSDLModeler.java

示例3: getCustomizedOperationName

import com.sun.tools.internal.ws.processor.generator.Names; //导入方法依赖的package包/类
private String getCustomizedOperationName(Operation operation) {
    JAXWSBinding jaxwsCustomization = (JAXWSBinding)getExtensionOfType(operation, JAXWSBinding.class);
    String operationName = (jaxwsCustomization != null)?((jaxwsCustomization.getMethodName() != null)?jaxwsCustomization.getMethodName().getName():null):null;
    if(operationName != null){
        if(Names.isJavaReservedWord(operationName)){
            return null;
        }

        return operationName;
    }
    return operation.getName();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:PseudoSchemaBuilder.java

示例4: getJavaNameForOperation

import com.sun.tools.internal.ws.processor.generator.Names; //导入方法依赖的package包/类
protected String getJavaNameForOperation(Operation operation) {
    String name = operation.getJavaMethodName();
    if (Names.isJavaReservedWord(name)) {
        name = "_" + name;
    }
    return name;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:WSDLModeler.java


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