Java Code Examples for javax.xml.ws.WebServiceFeature.getClass()

The following are Jave code examples for showing how to use getClass() of the javax.xml.ws.WebServiceFeature class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenJSharp   File: WebServiceFeatureList.java   Source Code and License Vote up 5 votes
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;
}
 
Example 2
Project: openjdk-jdk10   File: WebServiceFeatureList.java   Source Code and License Vote up 5 votes
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;
}