edu.umd.cs.findbugs.annotations.NonNull.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(365)

本文整理了Java中edu.umd.cs.findbugs.annotations.NonNull.<init>()方法的一些代码示例,展示了NonNull.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull.<init>()方法的具体详情如下:
包路径:edu.umd.cs.findbugs.annotations.NonNull
类名称:NonNull
方法名:<init>

NonNull.<init>介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Creates a new LocalPluginManager
 * @param context Servlet context. Provided for compatibility as {@code Jenkins.getInstance().servletContext} should be used.
 * @param rootDir Jenkins home directory.
 */
public LocalPluginManager(@CheckForNull ServletContext context, @NonNull File rootDir) {
  super(context, new File(rootDir,"plugins"));
}

代码示例来源:origin: spotbugs/spotbugs

void foo(@CheckForNull Object o) {
    @NonNull
    Object l = o;
  }
}

代码示例来源:origin: spotbugs/spotbugs

@Override
  public void f(@NonNull Object obj, @CheckForNull Object obj2);
}

代码示例来源:origin: spotbugs/spotbugs

@NonNull
  T set2(@CheckForNull T o);
}

代码示例来源:origin: spotbugs/spotbugs

public class TestFieldAnnotations {
  @NonNull
  Object x;
  @CheckForNull
  Object y;

代码示例来源:origin: spotbugs/spotbugs

@Override
  @CheckForNull
  @ExpectWarning("NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION,NP_METHOD_RETURN_RELAXING_ANNOTATION")
  public Integer set2(@NonNull Integer o){
    return null;
  }
}

代码示例来源:origin: spotbugs/spotbugs

@Override
  @CheckForNull
  @ExpectWarning("NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION,NP_METHOD_RETURN_RELAXING_ANNOTATION")
  public Integer set2(@NonNull Integer o){
    return null;
  }
}

代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder

/**
 * Possibly handles redirecting an item.
 * @param item an item which the user wishes to move
 * @param destination the location the user wishes to move it to
 * @param newItem if moving succeeds, set this to the new item (typically same object as {@code item})
 * @param chain zero or more remaining handlers which could be delegated to (may call this method on the first and pass in the rest of the chain)
 * @return {@link Failure} if the move is known to not be able to proceed, or a custom response such as a redirect, or a delegated response from the first handler in the chain, or null if no HTTP response is warranted or possible
 * @throws IOException if the move was attempted but failed
 * @throws InterruptedException if the move was attempted but was interrupted
 */
public abstract @CheckForNull HttpResponse handle(@NonNull Item item, @NonNull ItemGroup<?> destination, @NonNull AtomicReference<Item> newItem, @NonNull List<? extends RelocationHandler> chain) throws IOException, InterruptedException;

代码示例来源:origin: org.jenkins-ci.plugins/jsch

protected JSchSSHPasswordAuthenticator(@NonNull JSchConnector connection,
                    @NonNull StandardUsernamePasswordCredentials user,
                    @CheckForNull String username) {
  super(connection, user, username);
}

代码示例来源:origin: org.jenkins-ci.plugins/ssh-credentials

/**
 * Constructor.
 *
 * @param connection the connection we will be authenticating.
 */
public TrileadSSHPublicKeyAuthenticator(@NonNull Connection connection,
                    @NonNull SSHUserPrivateKey user,
                    @CheckForNull String username) {
  super(connection, user, username);
}

代码示例来源:origin: org.jenkins-ci.plugins/ssh-credentials

/**
 * Constructor.
 *
 * @param connection the connection we will be authenticating.
 * @since 1.4
 */
public TrileadSSHPasswordAuthenticator(@NonNull Connection connection,
                    @NonNull StandardUsernamePasswordCredentials user,
                    @CheckForNull String username) {
  super(connection, user, username);
}

代码示例来源:origin: org.jenkins-ci.plugins/jsch

/**
 * Constructor.
 *
 * @param connector the connection we will be authenticating.
 * @since 1.4
 */
public JSchSSHPublicKeyAuthenticator(@NonNull JSchConnector connector, @NonNull SSHUserPrivateKey user,
                   @CheckForNull String username) {
  super(connector, user, username);
}

代码示例来源:origin: org.jenkins-ci.plugins/ssh-credentials

/**
 * Constructor.
 *
 * @param connector the connection we will be authenticating.
 * @since 1.4
 */
public JSchSSHPublicKeyAuthenticator(@NonNull JSchConnector connector, @NonNull SSHUserPrivateKey user,
                   @CheckForNull String username) {
  super(connector, user, username);
}

代码示例来源:origin: org.jenkins-ci.plugins/ssh-credentials

protected JSchSSHPasswordAuthenticator(@NonNull JSchConnector connection,
                    @NonNull StandardUsernamePasswordCredentials user,
                    @CheckForNull String username) {
  super(connection, user, username);
}

代码示例来源:origin: jenkinsci/gitea-plugin

/**
 * Constructor.
 *
 * @param type    the type of event.
 * @param payload the payload.
 * @param origin  the origin.
 */
public AbstractGiteaSCMHeadEvent(@NonNull Type type, @NonNull E payload, @CheckForNull String origin) {
  super(type, payload, origin);
}

代码示例来源:origin: org.jenkins-ci.plugins/credentials

/**
 * Constructs an instance that matches the specified java bean property against the supplied value.
 *
 * @param name     the property name.
 * @param expected the expected value.
 */
public BeanPropertyMatcher(@NonNull String name, @CheckForNull T expected) {
  this.name = name;
  this.expected = expected;
}

代码示例来源:origin: org.jenkins-ci.plugins/credentials

/**
 * Our constructor.
 *
 * @param divId            id of the {@literal <input>} element on the {@code window.opener} of the
 *                         pop-up to inject the uploaded content into.
 * @param uploadedKeystore the content.
 */
public Upload(@NonNull String divId, @CheckForNull SecretBytes uploadedKeystore) {
  this.divId = divId;
  this.uploadedKeystore = uploadedKeystore;
}

代码示例来源:origin: org.jenkins-ci.plugins/git

/**
 * Configures the {@link GitTool#getName()} to use.
 *
 * @param gitTool the {@link GitTool#getName()} or {@code null} to use the system default.
 * @return {@code this} for method chaining.
 */
@SuppressWarnings("unchecked")
@NonNull
public final B withGitTool(@CheckForNull String gitTool) {
  this.gitTool = gitTool;
  return (B) this;
}

代码示例来源:origin: org.jenkins-ci.plugins/git

/**
 * Configures the {@link GitRepositoryBrowser} to use.
 *
 * @param browser the {@link GitRepositoryBrowser} or {@code null} to use the default "auto" browser.
 * @return {@code this} for method chaining.
 */
@SuppressWarnings("unchecked")
@NonNull
public final B withBrowser(@CheckForNull GitRepositoryBrowser browser) {
  this.browser = browser;
  return (B) this;
}

代码示例来源:origin: org.jenkins-ci.plugins/git

/**
 * Constructor.
 *
 * @param criteria (optional) criteria.
 * @param observer the {@link SCMHeadObserver}.
 */
public GitSCMSourceContext(@CheckForNull SCMSourceCriteria criteria, @NonNull SCMHeadObserver observer) {
  super(criteria, observer);
}

相关文章

NonNull类方法