当前位置: 首页>>代码示例>>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;未经允许,请勿转载。