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


Java Dispatcher类代码示例

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


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

示例1: getNames

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
/**
 * Returns the names of the given command and all its dispatchers
 *
 * @param descriptor the command
 *
 * @return the names
 */
public static Stack<String> getNames(CommandDescriptor descriptor)
{
    Stack<String> commands = new Stack<>();
    commands.push(descriptor.getName());
    Dispatcher dispatcher = descriptor.getDispatcher();
    while (dispatcher != null && dispatcher.getDescriptor() != null)
    {
        descriptor = dispatcher.getDescriptor();
        if (descriptor.getName().isEmpty())
        {
            break;
        }

        dispatcher = descriptor.getDispatcher();
        if (dispatcher != null)
        {
            commands.add(descriptor.getName());
        }
    }
    return commands;
}
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:29,代码来源:UsageGenerator.java

示例2: registerCommands

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
@Override
public void registerCommands(CommandManager cm, I18n i18n)
{
    super.registerCommands(cm, i18n);
    ((Dispatcher) cm.getCommand("eco")).addCommand(new EcoBankCommand(cm, this, i18n));
    cm.getProviders().register(module, new VirtualAccountParser(this, i18n), BaseAccount.Virtual.class);
    BankCommand bankCommand = new BankCommand(cm, this, i18n);
    cm.addCommand(bankCommand);
    bankCommand.addCommand(new BankManageCommand(cm, this, i18n));
}
 
开发者ID:CubeEngine,项目名称:modules-main,代码行数:11,代码来源:BankConomyService.java

示例3: getDispatcher

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
@Override
public Dispatcher getDispatcher()
{
    return this.dispatcher;
}
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:6,代码来源:AliasDescriptor.java

示例4: setDispatcher

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
@Override
public void setDispatcher(Dispatcher dispatcher)
{
    this.dispatcher = dispatcher;
}
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:6,代码来源:AliasDescriptor.java

示例5: ContainerCommandDescriptor

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
public ContainerCommandDescriptor(Dispatcher dispatcher)
{
    super(dispatcher);
}
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:5,代码来源:ContainerCommandDescriptor.java

示例6: build

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
protected BasicParametricCommand build(Dispatcher dispatcher, ParametricCommandDescriptor descriptor)
{
    descriptor.setOwner(dispatcher.getDescriptor().getOwner());
    return new BasicParametricCommand(descriptor);
}
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:6,代码来源:ParametricBuilder.java

示例7: buildCommand

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
@Override
public final CommandBase buildCommand(Dispatcher base, OriginT origin)
{
    return isApplicable(origin) ? this.build(base, buildDescriptor(origin)) : null;
}
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:6,代码来源:AbstractCommandBuilder.java

示例8: buildCommand

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
/**
 * Builds a new command
 *
 * @param base the base Dispatcher for the built command
 * @param origin the origin of the command
 * @return the command
 */
CommandBase buildCommand(Dispatcher base, OriginT origin);
 
开发者ID:CubeEngine,项目名称:Butler,代码行数:9,代码来源:CommandBuilder.java

示例9: build

import org.cubeengine.butler.Dispatcher; //导入依赖的package包/类
protected abstract CommandBase build(Dispatcher base, DescriptorT descriptor); 
开发者ID:CubeEngine,项目名称:Butler,代码行数:2,代码来源:AbstractCommandBuilder.java


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