当前位置: 首页>>代码示例>>Java>>正文


Java Setter类代码示例

本文整理汇总了Java中org.kohsuke.args4j.spi.Setter的典型用法代码示例。如果您正苦于以下问题:Java Setter类的具体用法?Java Setter怎么用?Java Setter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Setter类属于org.kohsuke.args4j.spi包,在下文中一共展示了Setter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PropertyOptionHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
public PropertyOptionHandler (CmdLineParser parser,
                              OptionDef option,
                              Setter<? super Properties> setter)
{
    super(parser, option, setter);

    if (setter.asFieldSetter() == null) {
        throw new IllegalArgumentException(
                "PropertyOptionHandler can only work with fields");
    }
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:12,代码来源:CLI.java

示例2: KombinationsberechnungParameterJaNeinOptionHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
public KombinationsberechnungParameterJaNeinOptionHandler(CmdLineParser parser,
                                                          OptionDef option,
                                                          Setter<? super Boolean> setter) {

  super(parser, option, setter);
  theParser = parser;
}
 
开发者ID:karstengresch,项目名称:chordelia,代码行数:8,代码来源:KombinationsberechnungParameterJaNeinOptionHandler.java

示例3: OptionalOptionHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
public OptionalOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<? super Optional<?>> setter
) {
    super(parser, option, setter);

    final Field f = (Field) setter.asFieldSetter().asAnnotatedElement();
    final ParameterizedType p = (ParameterizedType) f.getGenericType();
    this.type = p.getActualTypeArguments()[0];
}
 
开发者ID:spotify,项目名称:heroic,代码行数:10,代码来源:OptionalOptionHandler.java

示例4: TimestampHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public TimestampHandler(
    @Assisted CmdLineParser parser,
    @Assisted OptionDef option,
    @Assisted Setter<Timestamp> setter) {
  super(parser, option, setter);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:TimestampHandler.java

示例5: PatchSetIdHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public PatchSetIdHandler(
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<PatchSet.Id> setter) {
  super(parser, option, setter);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:PatchSetIdHandler.java

示例6: ChangeIdHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public ChangeIdHandler(
    // TODO(dborowitz): Not sure whether this is injectable here.
    Provider<InternalChangeQuery> queryProvider,
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<Change.Id> setter) {
  super(parser, option, setter);
  this.queryProvider = queryProvider;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:11,代码来源:ChangeIdHandler.java

示例7: AccountGroupUUIDHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public AccountGroupUUIDHandler(
    final GroupBackend groupBackend,
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<AccountGroup.UUID> setter) {
  super(parser, option, setter);
  this.groupBackend = groupBackend;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:10,代码来源:AccountGroupUUIDHandler.java

示例8: ObjectIdHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public ObjectIdHandler(
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<ObjectId> setter) {
  super(parser, option, setter);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:ObjectIdHandler.java

示例9: AccountGroupIdHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public AccountGroupIdHandler(
    final GroupCache groupCache,
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<AccountGroup.Id> setter) {
  super(parser, option, setter);
  this.groupCache = groupCache;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:10,代码来源:AccountGroupIdHandler.java

示例10: SocketAddressHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public SocketAddressHandler(
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<SocketAddress> setter) {
  super(parser, option, setter);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:SocketAddressHandler.java

示例11: ProjectHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public ProjectHandler(
    ProjectCache projectCache,
    PermissionBackend permissionBackend,
    Provider<CurrentUser> user,
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<ProjectState> setter) {
  super(parser, option, setter);
  this.projectCache = projectCache;
  this.permissionBackend = permissionBackend;
  this.user = user;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:ProjectHandler.java

示例12: AccountIdHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public AccountIdHandler(
    AccountResolver accountResolver,
    AccountManager accountManager,
    AuthConfig authConfig,
    @Assisted CmdLineParser parser,
    @Assisted OptionDef option,
    @Assisted Setter<Account.Id> setter) {
  super(parser, option, setter);
  this.accountResolver = accountResolver;
  this.accountManager = accountManager;
  this.authType = authConfig.getAuthType();
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:AccountIdHandler.java

示例13: SubcommandHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@Inject
public SubcommandHandler(
    @Assisted final CmdLineParser parser,
    @Assisted final OptionDef option,
    @Assisted final Setter<String> setter) {
  super(parser, option, setter);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:SubcommandHandler.java

示例14: createOptionHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
protected OptionHandler createOptionHandler(OptionDef option, Setter setter) {
  if (isHandlerSpecified(option) || isEnum(setter) || isPrimitive(setter)) {
    return add(super.createOptionHandler(option, setter));
  }

  OptionHandlerFactory<?> factory = handlers.get(setter.getType());
  if (factory != null) {
    return factory.create(this, option, setter);
  }
  return add(super.createOptionHandler(option, setter));
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:CmdLineParser.java

示例15: ProxyOptionHandler

import org.kohsuke.args4j.spi.Setter; //导入依赖的package包/类
/**
 * Default constructor.
 * @param parser the parser
 * @param option the option definition
 * @param setter the setter
 * @throws CmdLineException 
 */
public ProxyOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super Object> setter) throws CmdLineException {
	super(parser, option, setter);

	OptionDef proxyOption = new OptionDef(option.usage(), option.metaVar(), option.required(), OptionHandler.class, option.isMultiValued()); 
	proxy = parser.createOptionHandler(proxyOption, setter);

	if (!option.required() && CmdLineOptionsProvider.class.isAssignableFrom(this.setter.getType())) {
		handleExtraArgs();
	}
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:18,代码来源:ProxyOptionHandler.java


注:本文中的org.kohsuke.args4j.spi.Setter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。