本文整理汇总了Java中com.sun.istack.internal.Nullable类的典型用法代码示例。如果您正苦于以下问题:Java Nullable类的具体用法?Java Nullable怎么用?Java Nullable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Nullable类属于com.sun.istack.internal包,在下文中一共展示了Nullable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addSchemaFragmentSource
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
private @Nullable void addSchemaFragmentSource(Document doc, String systemId, Map<String, DOMSource> map) {
Element e = doc.getDocumentElement();
assert e.getNamespaceURI().equals(WSDLConstants.NS_WSDL);
assert e.getLocalName().equals("definitions");
NodeList typesList = e.getElementsByTagNameNS(WSDLConstants.NS_WSDL, "types");
for(int i=0; i < typesList.getLength(); i++) {
NodeList schemaList = ((Element)typesList.item(i)).getElementsByTagNameNS(WSDLConstants.NS_XMLNS, "schema");
for(int j=0; j < schemaList.getLength(); j++) {
Element elem = (Element)schemaList.item(j);
NamespaceSupport nss = new NamespaceSupport();
// Doing this because transformer is not picking up inscope namespaces
// why doesn't transformer pickup the inscope namespaces ??
buildNamespaceSupport(nss, elem);
patchDOMFragment(nss, elem);
String docId = systemId+"#schema"+j;
map.put(docId, new DOMSource(elem, docId));
}
}
}
示例2: captureStackTrace
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
/**
* Creates a DOM node that represents the complete stack trace of the exception,
* and attach that to {@link DetailType}.
*/
final void captureStackTrace(@Nullable Throwable t) {
if(t==null) return;
if(!captureStackTrace) return; // feature disabled
try {
Document d = DOMUtil.createDom();
ExceptionBean.marshal(t,d);
DetailType detail = getDetail();
if(detail==null)
setDetail(detail=new DetailType());
detail.getDetails().add(d.getDocumentElement());
} catch (JAXBException e) {
// this should never happen
logger.log(Level.WARNING, "Unable to capture the stack trace into XML",e);
}
}
示例3: getSatellite
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
@Override
public @Nullable <T extends com.oracle.webservices.internal.api.message.PropertySet> T getSatellite(Class<T> satelliteClass) {
T satellite = (T) satellites.get(satelliteClass);
if (satellite != null) {
return satellite;
}
for (PropertySet child : satellites.values()) {
if (satelliteClass.isInstance(child)) {
return satelliteClass.cast(child);
}
if (DistributedPropertySet.class.isInstance(child)) {
satellite = DistributedPropertySet.class.cast(child).getSatellite(satelliteClass);
if (satellite != null) {
return satellite;
}
}
}
return null;
}
示例4: doExecute
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
@Override
@Nullable
protected <T> T doExecute(URI url, @Nullable HttpMethod method, @Nullable RequestCallback requestCallback,
@Nullable ResponseExtractor<T> responseExtractor) throws RestClientException {
String from = name;
String to = url.
toString().
replace("http://", "").
replace("http:// www.", "").
replace("www.", "").
replace("/", "%20").
toLowerCase();
System.out.println(from);
System.out.println(to);
try {
restTemplate.postForObject("http://trace-callback-service/" + from + "/" + to, null, Object.class);
} catch (Exception exception) {
}
return super.doExecute(url, method, requestCallback, responseExtractor);
}
示例5: create
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
/**
* @param classLoader
* @param container
* @param implType
* @param invoker
* @param argsBuilder
* @param isAsync
*
* @return
*/
public static <T> ProviderInvokerTube<T> create(@Nullable final ClassLoader classLoader,
@NotNull final Container container,
@NotNull final Class<T> implType,
@NotNull final Invoker invoker,
@NotNull final ProviderArgumentsBuilder<?> argsBuilder,
final boolean isAsync)
{
for (ProviderInvokerTubeFactory factory : ServiceFinder.find(ProviderInvokerTubeFactory.class,
classLoader, container))
{
ProviderInvokerTube<T> tube = factory.doCreate(implType, invoker, argsBuilder, isAsync);
if (tube != null) {
if (logger.isLoggable(Level.FINE)) {
ProviderInvokerTubeFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), tube});
}
return tube;
}
}
return DEFAULT.createDefault(implType, invoker, argsBuilder, isAsync);
}
示例6: createEndpointIFBaseProxy
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
private <T> T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr, QName portName, Class<T> portInterface,
WebServiceFeatureList webServiceFeatures, SEIPortInfo eif) {
//fail if service doesnt have WSDL
if (wsdlService == null) {
throw new WebServiceException(ClientMessages.INVALID_SERVICE_NO_WSDL(serviceName));
}
if (wsdlService.get(portName)==null) {
throw new WebServiceException(
ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames()));
}
BindingImpl binding = eif.createBinding(webServiceFeatures, portInterface);
InvocationHandler pis = getStubHandler(binding, eif, epr);
T proxy = createProxy(portInterface, pis);
if (serviceInterceptor != null) {
serviceInterceptor.postCreateProxy((WSBindingProvider)proxy, portInterface);
}
return proxy;
}
示例7: createServerResponse
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
/**
* Creates a server-side response {@link Packet} from a request
* packet ({@code this}). If WS-Addressing is enabled, <code>action</code>
* is used as Action Message Addressing Property.
* <p><p>
* This method should be called only for creating protocol response messages
* that require a particular value of Action since they are not associated
* with a {@link WSBinding} and {@link WSDLPort} but do know the {@link AddressingVersion}
* and {@link SOAPVersion}.
*
* @param responseMessage The {@link Message} that represents a reply. Can be null.
* @param addressingVersion The WS-Addressing version of the response message.
* @param soapVersion The SOAP version of the response message.
* @param action The response Action Message Addressing Property value.
* @return response packet
*/
public Packet createServerResponse(@Nullable Message responseMessage, @NotNull AddressingVersion addressingVersion, @NotNull SOAPVersion soapVersion, @NotNull String action) {
Packet responsePacket = createClientResponse(responseMessage);
responsePacket.setState(State.ServerResponse);
// populate WS-A headers only if WS-A is enabled
if (addressingVersion == null) {
return responsePacket;
}
//populate WS-A headers only if the request has addressing headers
String inputAction = AddressingUtils.getAction(this.getMessage().getHeaders(), addressingVersion, soapVersion);
if (inputAction == null) {
return responsePacket;
}
populateAddressingHeaders(responsePacket, addressingVersion, soapVersion, action, false);
return responsePacket;
}
示例8: mergeFeature
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
public static @Nullable <F extends WebServiceFeature> F mergeFeature(final @NotNull Class<F> featureType,
@Nullable WebServiceFeatureList list1, @Nullable WebServiceFeatureList list2)
throws WebServiceException {
final F feature1 = list1 != null ? list1.get(featureType) : null;
final F feature2 = list2 != null ? list2.get(featureType) : null;
if (feature1 == null) {
return feature2;
}
else if (feature2 == null) {
return feature1;
}
else {
if (feature1.equals(feature2)) {
return feature1;
}
else {
// TODO exception text
throw new WebServiceException(feature1 + ", " + feature2);
}
}
}
示例9: OperationDispatcher
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
public OperationDispatcher(@NotNull WSDLPort wsdlModel, @NotNull WSBinding binding, @Nullable SEIModel seiModel) {
this.binding = binding;
opFinders = new ArrayList<WSDLOperationFinder>();
if (binding.getAddressingVersion() != null) {
opFinders.add(new ActionBasedOperationFinder(wsdlModel, binding, seiModel));
}
opFinders.add(new PayloadQNameBasedOperationFinder(wsdlModel, binding, seiModel));
opFinders.add(new SOAPActionBasedOperationFinder(wsdlModel, binding, seiModel));
}
示例10: getOutputAction
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
String getOutputAction(@Nullable WSDLBoundOperation wbo) {
String action = AddressingVersion.UNSET_OUTPUT_ACTION;
if (wbo != null) {
WSDLOutput op = wbo.getOperation().getOutput();
if (op != null) {
action = op.getAction();
}
}
return action;
}
示例11: ClientTubeAssemblerContext
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
/**
* This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
*
* @since JAX-WS 2.2
*/
public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
@NotNull WSBindingProvider bindingProvider, @NotNull WSBinding binding,
@NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
this(address, wsdlModel, (bindingProvider==null? null: bindingProvider.getPortInfo().getOwner()), bindingProvider, binding, container, codec, seiModel, sei);
}
示例12: getFailedScript
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
@Nullable
FailedScript getFailedScript(@NotNull final String name)
{
for(FailedScript script : failedscripts)
{
if(script.name.equals(name))
{
return script;
}
}
return null;
}
示例13: removeScript
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
@Nullable
void removeScript(@NotNull final Script script)
{
if(scripts.contains(script))
{
scripts.remove(script);
}
}
示例14: getFirstElementChild
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
/**
* Gets the first element child.
*/
public static
@Nullable
Element getFirstElementChild(Node parent) {
for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
if (n.getNodeType() == Node.ELEMENT_NODE) {
return (Element) n;
}
}
return null;
}
示例15: readResponse
import com.sun.istack.internal.Nullable; //导入依赖的package包/类
protected @Nullable InputStream readResponse() {
InputStream is;
try {
is = httpConnection.getInputStream();
} catch(IOException ioe) {
is = httpConnection.getErrorStream();
}
if (is == null) {
return is;
}
// Since StreamMessage doesn't read </s:Body></s:Envelope>, there
// are some bytes left in the InputStream. This confuses JDK and may
// not reuse underlying sockets. Hopefully JDK fixes it in its code !
final InputStream temp = is;
return new FilterInputStream(temp) {
// Workaround for "SJSXP XMLStreamReader.next() closes stream".
// So it doesn't read from the closed stream
boolean closed;
@Override
public void close() throws IOException {
if (!closed) {
closed = true;
while(temp.read(THROW_AWAY_BUFFER) != -1);
super.close();
}
}
};
}