org.eclipse.sisu.Nullable.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(150)

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

Nullable.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/maven

@Inject
public CoreExportsProvider( PlexusContainer container, @Nullable CoreExports exports )
{
  if ( exports == null )
  {
    this.exports = new CoreExports( CoreExtensionEntry.discoverFrom( container.getContainerRealm() ) );
  }
  else
  {
    this.exports = exports;
  }
}

代码示例来源:origin: apache/maven

@Nullable
@Named( "simple" )
private LocalRepositoryManagerFactory simpleLocalRepoMgrFactory;
@Nullable
@Named( "ide" )
private WorkspaceReader workspaceRepository;

代码示例来源:origin: com.atlassian.sdk/ap3-api

public class Ap3Help extends Help implements Ap3Command
{
  @Inject
  @Nullable
  protected GlobalOptions globalOptions = new GlobalOptions();

  @Override
  public void setArgs(String[] args)
  {
    //do nothing
  }
}

代码示例来源:origin: org.eclipse.sisu/org.eclipse.sisu.inject.tests

@Inject
  UnrestrictedInstance( @Nullable final Y single, @Named( "fixed" ) final Y fixed )
  {
    this.single = single;
    this.fixed = fixed;
  }
}

代码示例来源:origin: org.eclipse.sisu/org.eclipse.sisu.inject.tests

static class PlaceholderInstance
  extends AbstractX
{
  @Inject
  @Nullable
  @Named( "${name}" )
  Y single;
}

代码示例来源:origin: org.eclipse.sisu/org.eclipse.sisu.inject.tests

static class PlaceholderConfig
  extends AbstractX
{
  @Inject
  @Nullable
  @Named( "4${value}2" )
  int single;
}

代码示例来源:origin: org.eclipse.sisu/org.eclipse.sisu.inject.tests

@Inject
NamedInstance( @Nullable @Named( "TEST" ) final Y single )
{
  this.single = single;
}

代码示例来源:origin: org.eclipse.sisu/org.eclipse.sisu.inject.tests

static class PlaceholderString
  extends AbstractX
{
  @Inject
  @Nullable
  @Named( "${text}" )
  String config;
  @Inject
  @Nullable
  @Named( "text" )
  String plain;
}

代码示例来源:origin: io.takari.aether/aether-connector-okhttp

@Inject
public AetherRepositoryConnectorFactory(FileProcessor fileProcessor, @Nullable SSLSocketFactory sslSocketFactory) throws NoSuchAlgorithmException {
 this.fileProcessor = fileProcessor;
 
 // explicitly use jdk-default ssl socket factory if none is provided externally
 // this is necessary because okhttp default socket factory does not honour
 // javax.net.ssl.keyStore/trustStore system properties, which are the only way
 // to use custom ket/trust stores in maven in m2e
 this.sslSocketFactory = sslSocketFactory != null? sslSocketFactory: SSLContext.getDefault().getSocketFactory();
}

代码示例来源:origin: org.eclipse.sisu/org.eclipse.sisu.inject.tests

@Inject
  NamedType( @Named( "fixed" ) final Y fixed, @Nullable @Named final Y single )
  {
    this.single = single;
    this.fixed = fixed;
  }
}

代码示例来源:origin: org.eclipse.aether/aether-impl

@Inject
Slf4jLoggerFactory( @Nullable ILoggerFactory factory )
{
  setLoggerFactory( factory );
}

代码示例来源:origin: com.atlassian.sdk/ap3-api

/**
 * @since version
 */
public abstract class BaseAp3Command implements Ap3Command
{
  @Inject
  @Nullable
  protected GlobalOptions globalOptions = new GlobalOptions();
  
  private String[] passedArgs;
  
  @Inject
  private Ap3Logger logger;
  
  protected Logger getLog()
  {
    return logger;
  }
  
  public void setArgs(String[] args)
  {
    this.passedArgs = args;
  }
  
  protected String[] getPassedInArgs()
  {
    return passedArgs;
  }
}

代码示例来源:origin: sonatype-nexus-community/nexus-repository-composer

private static String buildZipballPath(final String vendor,
                    final String project,
                    final String version,
                    @Nullable final String name)
{
 return String.format(ZIPBALL_PATH, vendor, project, version,
   name == null ? String.format(NAME_PATTERN, vendor, project, version) : name);
}

代码示例来源:origin: org.apache.maven.resolver/maven-resolver-impl

@Inject
Slf4jLoggerFactory( @Nullable ILoggerFactory factory )
{
  setLoggerFactory( factory );
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

@Inject
@SuppressWarnings("unchecked")
public DefaultProcessConfiguration(@Config("process.defaultConfiguration") @Nullable String path) throws IOException {
  if (path == null) {
    log.warn("init -> no default process configuration");
    this.cfg = Collections.emptyMap();
    return;
  }
  log.info("init -> using external default process configuration: {}", path);
  ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
  try (InputStream in = Files.newInputStream(Paths.get(path))) {
    this.cfg = Optional.ofNullable(mapper.readValue(in, Map.class)).orElse(Collections.emptyMap());
  }
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

@Inject
public TemplateConfiguration(@Config("template.cacheDir") @Nullable String cacheDir) throws IOException {
  this.cacheDir = getPath(cacheDir, "templateCache");
  log.info("init -> using {} to cache templates", this.cacheDir);
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

@Inject
public RepositoryConfiguration(@Config("repositoryCache.cacheDir") @Nullable String cacheDir) throws IOException {
  this.cacheDir = getPath(cacheDir, "repoCache");
  log.info("init -> using {} to cache repositories", this.cacheDir);
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

@Named
@Singleton
public class RememberMeConfiguration implements Serializable {

  @Inject
  @Config("rememberMe.maxAge")
  private int rememberMeMaxAge;

  @Inject
  @Config("rememberMe.cipherKey")
  @Nullable
  private byte[] cipherKey;

  public int getRememberMeMaxAge() {
    return rememberMeMaxAge;
  }

  public byte[] getCipherKey() {
    return cipherKey;
  }
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

@Inject
public LdapConfiguration(@Config("ldap.exposeAttributes") @Nullable String exposeAttributes) {
  this.exposeAttributes = split(exposeAttributes);
}

代码示例来源:origin: com.walmartlabs.concord.server/concord-server

@Named
@Singleton
public class GithubConfiguration {

  @Inject
  @Config("github.secret")
  @Nullable
  private String secret;

  @Inject
  @Config("github.githubDomain")
  private String githubDomain;

  @Inject
  @Config("github.defaultFilter")
  private Map<String, Object> defaultFilter;

  public String getSecret() {
    return secret;
  }

  public String getGithubDomain() {
    return githubDomain;
  }

  public Map<String, Object> getDefaultFilter() {
    return defaultFilter;
  }
}

相关文章

Nullable类方法