本文整理汇总了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");
}
}
示例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];
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}
示例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));
}
示例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();
}
}