本文整理了Java中org.codehaus.groovy.runtime.InvokerHelper.toTypeString()
方法的一些代码示例,展示了InvokerHelper.toTypeString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。InvokerHelper.toTypeString()
方法的具体详情如下:
包路径:org.codehaus.groovy.runtime.InvokerHelper
类名称:InvokerHelper
方法名:toTypeString
[英]A helper method to format the arguments types as a comma-separated list.
[中]将参数类型格式化为逗号分隔列表的帮助器方法。
代码示例来源:origin: org.codehaus.groovy/groovy
/**
* A helper method to format the arguments types as a comma-separated list.
*
* @param arguments the type to process
* @return the string representation of the type
*/
public static String toTypeString(Object[] arguments) {
return toTypeString(arguments, -1);
}
代码示例来源:origin: org.codehaus.groovy/groovy
public String getMessage() {
return "No signature of method: "
+ (isStatic ? "static " : "")
+ type.getName()
+ "."
+ method
+ "() is applicable for argument types: ("
+ InvokerHelper.toTypeString(arguments, 60)
+ ") values: "
+ InvokerHelper.toArrayString(arguments, 60, true)
+ MethodRankHelper.getMethodSuggestionString(method, type, arguments);
}
代码示例来源:origin: org.codehaus.groovy/groovy
private CachedConstructor createCachedConstructor(Object[] arguments) {
if (arguments == null) arguments = EMPTY_ARGUMENTS;
Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
MetaClassHelper.unwrap(arguments);
CachedConstructor cOnstructor= (CachedConstructor) chooseMethod("
if (cOnstructor== null) {
cOnstructor= (CachedConstructor) chooseMethod("
}
if (cOnstructor== null) {
throw new GroovyRuntimeException(
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
}
return constructor;
}
代码示例来源:origin: org.codehaus.groovy/groovy
private Object invokeConstructor(Class at, Object[] arguments) {
checkInitalised();
if (arguments == null) arguments = EMPTY_ARGUMENTS;
Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
MetaClassHelper.unwrap(arguments);
CachedConstructor cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
return constructor.doConstructorInvoke(arguments);
}
if (arguments.length == 1) {
Object firstArgument = arguments[0];
if (firstArgument instanceof Map) {
cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
Object bean = constructor.doConstructorInvoke(MetaClassHelper.EMPTY_ARRAY);
setProperties(bean, ((Map) firstArgument));
return bean;
}
}
}
throw new GroovyRuntimeException(
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
public String getMessage() {
return "No signature of method: "
+ (isStatic ? "static " : "")
+ type.getName()
+ "."
+ method
+ "() is applicable for argument types: ("
+ InvokerHelper.toTypeString(arguments)
+ ") values: "
+ InvokerHelper.toString(arguments);
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public String getMessage() {
return "No signature of method: "
+ (isStatic ? "static " : "")
+ type.getName()
+ "."
+ method
+ "() is applicable for argument types: ("
+ InvokerHelper.toTypeString(arguments)
+ ") values: "
+ InvokerHelper.toString(arguments);
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public String getMessage() {
return "No signature of method: "
+ (isStatic ? "static " : "")
+ type.getName()
+ "."
+ method
+ "() is applicable for argument types: ("
+ InvokerHelper.toTypeString(arguments)
+ ") values: "
+ InvokerHelper.toString(arguments);
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public String getMessage() {
return "No signature of method: "
+ (isStatic ? "static " : "")
+ type.getName()
+ "."
+ method
+ "() is applicable for argument types: ("
+ InvokerHelper.toTypeString(arguments)
+ ") values: "
+ InvokerHelper.format(arguments, false, 40)
+ MethodRankHelper.getMethodSuggestionString(method, type, arguments);
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
代码示例来源:origin: org.kohsuke.droovy/groovy
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
代码示例来源:origin: org.kohsuke.droovy/groovy
private Object invokeConstructor(Class at, Object[] arguments) {
checkInitalised();
if (arguments == null) arguments = EMPTY_ARGUMENTS;
Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
MetaClassHelper.unwrap(arguments);
CachedConstructor cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
return constructor.doConstructorInvoke(arguments);
}
if (arguments.length == 1) {
Object firstArgument = arguments[0];
if (firstArgument instanceof Map) {
cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
Object bean = constructor.doConstructorInvoke(MetaClassHelper.EMPTY_ARRAY);
setProperties(bean, ((Map) firstArgument));
return bean;
}
}
}
throw new GroovyRuntimeException(
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
private Object invokeConstructor(Class at, Object[] arguments) {
checkInitalised();
if (arguments == null) arguments = EMPTY_ARGUMENTS;
Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
MetaClassHelper.unwrap(arguments);
CachedConstructor cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
return constructor.doConstructorInvoke(arguments);
}
if (arguments.length == 1) {
Object firstArgument = arguments[0];
if (firstArgument instanceof Map) {
cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
Object bean = constructor.doConstructorInvoke(MetaClassHelper.EMPTY_ARRAY);
setProperties(bean, ((Map) firstArgument));
return bean;
}
}
}
throw new GroovyRuntimeException(
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
private Object invokeConstructor(Class at, Object[] arguments) {
checkInitalised();
if (arguments == null) arguments = EMPTY_ARGUMENTS;
Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
MetaClassHelper.unwrap(arguments);
CachedConstructor cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
return constructor.doConstructorInvoke(arguments);
}
if (arguments.length == 1) {
Object firstArgument = arguments[0];
if (firstArgument instanceof Map) {
cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
Object bean = constructor.doConstructorInvoke(MetaClassHelper.EMPTY_ARRAY);
setProperties(bean, ((Map) firstArgument));
return bean;
}
}
}
throw new GroovyRuntimeException(
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
private Object invokeConstructor(Class at, Object[] arguments) {
checkInitalised();
if (arguments == null) arguments = EMPTY_ARGUMENTS;
Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
unwrap(arguments);
CachedConstructor cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
return doConstructorInvoke(at, constructor, arguments, true);
}
cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
return doConstructorInvoke(at, constructor, arguments, true);
}
if (arguments.length == 1) {
Object firstArgument = arguments[0];
if (firstArgument instanceof Map) {
cOnstructor= (CachedConstructor) chooseMethod("
if (constructor != null) {
Object bean = doConstructorInvoke(at, constructor, MetaClassHelper.EMPTY_ARRAY, true);
setProperties(bean, ((Map) firstArgument));
return bean;
}
}
}
throw new GroovyRuntimeException(
"Could not find matching constructor for: "
+ theClass.getName()
+ "(" + InvokerHelper.toTypeString(arguments) + ")");
}