qualified name与unqualified name

本文解释了在编程中Qualified Name与Unqualified Name的概念。Qualified Name即全名,包含完整路径;Unqualified Name则仅指名称的最后一部分。通过示例说明了两者在Java中的用法区别,并介绍了如何在IDE中快速获取类的全名。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

qualified name与unqualified name

看英文文档时候看到这个qualified/unqualified name概念

qualified name相当于full name

unqualified name则是full name的last part

比如代码中直接使用java.util.ArrayList就是qualified nam,而import了import java.util.*后使用ArrayList则是后者

参考 http://stackoverflow.com/questions/27966609/unqualified-name-in-java

如何在IDE中直接获取某个类或文件的qualified name

  • IDEA : 右键 -> Copy Reference
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:hl7-org:v3" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="PlatformService" targetNamespace="urn:hl7-org:v3"> <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" targetNamespace="urn:hl7-org:v3" version="1.0"> <xs:element name="HIPMessageServer" type="tns:HIPMessageServer"/> <xs:element name="HIPMessageServerResponse" type="tns:HIPMessageServerResponse"/> <xs:element name="patientRegister" type="tns:patientRegister"/> <xs:element name="patientRegisterResponse" type="tns:patientRegisterResponse"/> <xs:complexType name="patientRegister"> <xs:sequence> <xs:element form="qualified" minOccurs="0" name="in0" type="xs:string"/> <xs:element form="qualified" minOccurs="0" name="in1" type="xs:string"/> <xs:element form="qualified" minOccurs="0" name="in2" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="patientRegisterResponse"> <xs:sequence> <xs:element form="qualified" minOccurs="0" name="patientRegister" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="HIPMessageServer"> <xs:sequence> <xs:element form="qualified" minOccurs="0" name="in0" type="xs:string"/> <xs:element form="qualified" minOccurs="0" name="in1" type="xs:string"/> <xs:element form="qualified" minOccurs="0" name="in2" type="xs:string"/> <xs:element form="qualified" minOccurs="0" name="in3" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="HIPMessageServerResponse"> <xs:sequence> <xs:element form="qualified" minOccurs="0" name="HIPMessageServer" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name="patientRegister"> <wsdl:part element="tns:patientRegister" name="parameters"/> </wsdl:message> <wsdl:message name="patientRegisterResponse"> <wsdl:part element="tns:patientRegisterResponse" name="parameters"/> </wsdl:message> <wsdl:message name="HIPMessageServer"> <wsdl:part element="tns:HIPMessageServer" name="parameters"/> </wsdl:message> <wsdl:message name="HIPMessageServerResponse"> <wsdl:part element="tns:HIPMessageServerResponse" name="parameters"/> </wsdl:message> <wsdl:portType name="PlatformService"> <wsdl:operation name="patientRegister"> <wsdl:input message="tns:patientRegister" name="patientRegister"/> <wsdl:output message="tns:patientRegisterResponse" name="patientRegisterResponse"/> </wsdl:operation> <wsdl:operation name="HIPMessageServer"> <wsdl:input message="tns:HIPMessageServer" name="HIPMessageServer"/> <wsdl:output message="tns:HIPMessageServerResponse" name="HIPMessageServerResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="PlatformServiceSoapBinding" type="tns:PlatformService"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="patientRegister"> <soap:operation soapAction="" style="document"/> <wsdl:input name="patientRegister"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="patientRegisterResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="HIPMessageServer"> <soap:operation soapAction="" style="document"/> <wsdl:input name="HIPMessageServer"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="HIPMessageServerResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="PlatformService"> <wsdl:port binding="tns:PlatformServiceSoapBinding" name="PlatformServicePort"> <soap:address location="http://10.173.79.45/services/PlatformService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
最新发布
08-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值