當前位置: 首頁>>代碼示例>>Java>>正文


Java NotNull類代碼示例

本文整理匯總了Java中com.sun.istack.internal.NotNull的典型用法代碼示例。如果您正苦於以下問題:Java NotNull類的具體用法?Java NotNull怎麽用?Java NotNull使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NotNull類屬於com.sun.istack.internal包,在下文中一共展示了NotNull類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAttachmentParts

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
/**
 * Parses the entire stream and returns all MIME parts except root MIME part.
 *
 * @return Map<String, StreamAttachment> for all attachment parts
 */
public @NotNull Map<String, Attachment> getAttachmentParts() {
    if (!gotAll) {
        MIMEPart rootPart = (start != null) ? message.getPart(start) : message.getPart(0);
        List<MIMEPart> parts = message.getAttachments();
        for(MIMEPart part : parts) {
            if (part != rootPart) {
                String cid = part.getContentId();
                if (!attachments.containsKey(cid)) {
                    PartAttachment attach = new PartAttachment(part);
                    attachments.put(attach.getContentId(), attach);
                }
            }
        }
        gotAll = true;
    }
    return attachments;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:23,代碼來源:MimeMultipartParser.java

示例2: processException

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
@Override
public @NotNull NextAction processException(Throwable t) {
    final Packet response = Fiber.current().getPacket();
    ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class);
    if (tc == null) {
        tc = new ThrowableContainerPropertySet(t);
        response.addSatellite(tc);
    } else if (t != tc.getThrowable()) {
        // This is a pathological case where an exception happens after a previous exception.
        // Make sure you report the latest one.
        tc.setThrowable(t);
    }
    return processResponse(response.endpoint.createServiceResponseForException(tc, response, soapVersion, wsdlPort,
                                                                               response.endpoint.getSEIModel(),
                                                                               binding));
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:17,代碼來源:WsaServerTube.java

示例3: setImage

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
/**
 * Set a new Image as String (Path or Class-Path) for the Panel
 *
 * @param imagePath - Path or Class-Path
 * @param useURL - true uses Class-Path instead of a Path
 */
public void setImage(@NotNull String imagePath, boolean useURL) {
	if(useURL) {
		this.setBufferedImage(getClass().getResource(imagePath));
	} else {
		java.io.File imageFile;

		try {
			imageFile = new java.io.File(imagePath);
		} catch(Exception e) {
			e.printStackTrace();
			this.image = null;

			return;
		}

		this.setBufferedImage(imageFile);
	}
}
 
開發者ID:Petschko,項目名稱:Java-RPG-Maker-MV-Decrypter,代碼行數:25,代碼來源:JImageLabel.java

示例4: createServerResponse

import com.sun.istack.internal.NotNull; //導入依賴的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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:33,代碼來源:Packet.java

示例5: generateEnumDef

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
/**
 * Generates the minimum {@link JDefinedClass} skeleton
 * without filling in its body.
 */
private EnumOutline generateEnumDef(CEnumLeafInfo e) {
    JDefinedClass type;

    type = getClassFactory().createClass(
            getContainer(e.parent, EXPOSED), e.shortName, e.getLocator(), ClassType.ENUM);
    type.javadoc().append(e.javadoc);

    return new EnumOutline(e, type) {

        @Override
        public
        @NotNull
        Outline parent() {
            return BeanGenerator.this;
        }
    };
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:22,代碼來源:BeanGenerator.java

示例6: getFeature

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
public static @Nullable <F extends WebServiceFeature> F getFeature(@NotNull WebServiceFeature[] features,
                                                                   @NotNull Class<F> featureType) {
    for (WebServiceFeature f : features) {
        if (f.getClass() == featureType)
            return (F) f;
    }
    return null;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:9,代碼來源:WebServiceFeatureList.java

示例7: getReferenceParameters

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
/**
 * Gives a list of Reference Parameters in the Message
 * <p>
 * Headers which have attribute wsa:IsReferenceParameter="true"
 * This is not cached as one may reset the Message.
 *<p>
 */
@Property(MessageContext.REFERENCE_PARAMETERS)
public
@NotNull
List<Element> getReferenceParameters() {
    Message msg = getMessage();
    List<Element> refParams = new ArrayList<Element>();
    if (msg == null) {
        return refParams;
    }
    MessageHeaders hl = msg.getHeaders();
    for (Header h : hl.asList()) {
        String attr = h.getAttribute(AddressingVersion.W3C.nsUri, "IsReferenceParameter");
        if (attr != null && (attr.equals("true") || attr.equals("1"))) {
            Document d = DOMUtil.createDom();
            SAX2DOMEx s2d = new SAX2DOMEx(d);
            try {
                h.writeTo(s2d, XmlUtil.DRACONIAN_ERROR_HANDLER);
                refParams.add((Element) d.getLastChild());
            } catch (SAXException e) {
                throw new WebServiceException(e);
            }
            /*
            DOMResult result = new DOMResult(d);
            XMLDOMWriterImpl domwriter = new XMLDOMWriterImpl(result);
            try {
                h.writeTo(domwriter);
                refParams.add((Element) result.getNode().getLastChild());
            } catch (XMLStreamException e) {
                throw new WebServiceException(e);
            }
            */
        }
    }
    return refParams;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:43,代碼來源:Packet.java

示例8: getSPI

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
public @Nullable <S> S getSPI(@NotNull Class<S> spiType) {
    for (Component c : components) {
            S s = c.getSPI(spiType);
            if (s != null)
                    return s;
    }

    return getContainer().getSPI(spiType);
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:10,代碼來源:WSService.java

示例9: createServer

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
@Override
public @NotNull Tube createServer(@NotNull ServerTubeAssemblerContext context) {
    if (!(context instanceof ServerPipeAssemblerContext)) {
        throw new IllegalArgumentException("{0} is not instance of ServerPipeAssemblerContext");
    }
    return PipeAdapter.adapt(assembler.createServer((ServerPipeAssemblerContext) context));
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:8,代碼來源:TubelineAssemblerFactory.java

示例10: parse

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
/**
 * Figures out the binding from {@link BindingType} annotation.
 *
 * @return
 *      default to {@link BindingID#SOAP11_HTTP}, if no such annotation is present.
 * @see #parse(String)
 */
public static @NotNull BindingID parse(Class<?> implClass) {
    BindingType bindingType = implClass.getAnnotation(BindingType.class);
    if (bindingType != null) {
        String bindingId = bindingType.value();
        if (bindingId.length() > 0) {
            return BindingID.parse(bindingId);
        }
    }
    return SOAP11_HTTP;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:18,代碼來源:BindingID.java

示例11: createMOMLoop

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
private @NotNull ManagedObjectManager createMOMLoop(final String rootName, final int unique) {
    final boolean isFederated = AMXGlassfish.getGlassfishVersion() != null;
    ManagedObjectManager mom = createMOM(isFederated);
    mom = initMOM(mom);
    mom = createRoot(mom, rootName, unique);
    return mom;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:8,代碼來源:MonitorBase.java

示例12: getWSDLAddress

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
public String getWSDLAddress(@NotNull Packet request, @NotNull WSEndpoint endpoint) {
    String eprAddress = getEPRAddress(request,endpoint);
    if(adapter.getEndpoint().getPort() != null)
        return eprAddress+"?wsdl";
    else
        return null;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:8,代碼來源:ServerConnectionImpl.java

示例13: isIgnorable

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
public final boolean isIgnorable(@NotNull SOAPVersion soapVersion, @NotNull Set<String> roles) {
    // check mustUnderstand
    if(!_isMustUnderstand) return true;

    if (roles == null)
        return true;

    // now role
    return !roles.contains(_role);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:11,代碼來源:StreamHeader.java

示例14: getMessages

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
@Override
@NotNull
Map<QName, ? extends EditableWSDLMessage> getMessages();
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:4,代碼來源:EditableWSDLModel.java

示例15: processResponse

import com.sun.istack.internal.NotNull; //導入依賴的package包/類
public NextAction processResponse(@NotNull Packet response) {
    if (transport != null)
            return transport.processResponse(response);
    return doReturnWith(response);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:6,代碼來源:DeferredTransportPipe.java


注:本文中的com.sun.istack.internal.NotNull類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。