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


Java InvokerHelper.invokeMethodSafe方法代码示例

本文整理汇总了Java中org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe方法的典型用法代码示例。如果您正苦于以下问题:Java InvokerHelper.invokeMethodSafe方法的具体用法?Java InvokerHelper.invokeMethodSafe怎么用?Java InvokerHelper.invokeMethodSafe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.codehaus.groovy.runtime.InvokerHelper的用法示例。


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

示例1: bind

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void bind() {
    if (!bound) {
        bound = true;
        boundBean = bean;
        boundProperty = propertyName;
        try {
            InvokerHelper.invokeMethodSafe(boundBean, "addPropertyChangeListener", new Object[]{boundProperty, this});
            boundToProperty = true;
        } catch (MissingMethodException mme) {
            try {
                boundToProperty = false;
                InvokerHelper.invokeMethodSafe(boundBean, "addPropertyChangeListener", new Object[]{this});
            } catch (MissingMethodException mme2) {
                throw new RuntimeException("Properties in beans of type " + bean.getClass().getName() + " are not observable in any capacity (no PropertyChangeListener support).");
            }
        }
    }
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:19,代码来源:PropertyBinding.java

示例2: unbind

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void unbind() {
    if (bound) {
        if (boundToProperty) {
            try {
                InvokerHelper.invokeMethodSafe(boundBean, "removePropertyChangeListener", new Object[]{boundProperty, this});
            } catch (MissingMethodException mme) {
                // ignore, too bad so sad they don't follow conventions, we'll just leave the listener attached
            }
        } else {
            try {
                InvokerHelper.invokeMethodSafe(boundBean, "removePropertyChangeListener", new Object[]{this});
            } catch (MissingMethodException mme2) {
                // ignore, too bad so sad they don't follow conventions, we'll just leave the listener attached
            }
        }
        boundBean = null;
        boundProperty = null;
        bound = false;
    }
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:21,代码来源:PropertyBinding.java

示例3: request

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void request(List<?> options) throws AppException {
    for (Object object : options) {
        String str = toString.toString(object, "option");
        OptionDeclarationImpl o = optionFactory.create();
        InvokerHelper.invokeMethodSafe(o, "option", str);
    }
}
 
开发者ID:devent,项目名称:robobee-osgi,代码行数:8,代码来源:RequestsStatementImpl.java

示例4: prepend

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void prepend(String option, String value) {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("option", option);
    map.put("value", value);
    PrependStatementImpl s = prependFactory.create();
    InvokerHelper.invokeMethodSafe(s, "prepend", map);
    addStatement(s);
}
 
开发者ID:devent,项目名称:robobee-osgi,代码行数:9,代码来源:AbstractDeclaration.java

示例5: send

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void send(Map<String, Object> args) {
    Map<String, Object> map = new HashMap<String, Object>(args);
    SendStatementImpl s = sendFactory.create();
    InvokerHelper.invokeMethodSafe(s, "send", map);
    addStatement(s);
}
 
开发者ID:devent,项目名称:robobee-osgi,代码行数:7,代码来源:AbstractDeclaration.java

示例6: request

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void request(String option) {
    RequestsStatementImpl s = requestsFactory.create();
    InvokerHelper.invokeMethodSafe(s, "request", option);
    addStatement(s);
}
 
开发者ID:devent,项目名称:robobee-osgi,代码行数:6,代码来源:AbstractDeclaration.java

示例7: option

import org.codehaus.groovy.runtime.InvokerHelper; //导入方法依赖的package包/类
public void option(String string) {
    this.option = optionFactory.create();
    InvokerHelper.invokeMethodSafe(option, "option", string);
}
 
开发者ID:devent,项目名称:robobee-osgi,代码行数:5,代码来源:OptionStatementImpl.java


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