static String noConverter(Class fromType, Class desiredType) { return _formatter.format("no-converter-from", ClassFabUtils.getJavaClassName(desiredType), ClassFabUtils.getJavaClassName(fromType)); }
static String wrongTypeForProperty(String propertyName, Class propertyType, Class requiredType) { return _formatter.format("wrong-type-for-property", propertyName, ClassFabUtils .getJavaClassName(propertyType), ClassFabUtils.getJavaClassName(requiredType)); }
static String noConverter(Class fromType, Class desiredType) { return _formatter.format("no-converter-from", ClassFabUtils.getJavaClassName(desiredType), ClassFabUtils.getJavaClassName(fromType)); }
static String incompatiblePropertyType(String propertyName, Class propertyType, Class expectedType) { return _formatter.format("incompatible-property-type", propertyName, ClassFabUtils .getJavaClassName(propertyType), ClassFabUtils.getJavaClassName(expectedType)); }
static String wrongTypeForProperty(String propertyName, Class propertyType, Class requiredType) { return _formatter.format("wrong-type-for-property", propertyName, ClassFabUtils .getJavaClassName(propertyType), ClassFabUtils.getJavaClassName(requiredType)); }
/** * Javassist needs the class name to be as it appears in source code, even for arrays. Invoking * getName() on a Class instance representing an array returns the internal format (i.e, "[...;" * or something). This returns it as it would appear in Java code. */ public static String getJavaClassName(Class inputClass) { if (inputClass.isArray()) return getJavaClassName(inputClass.getComponentType()) + "[]"; return inputClass.getName(); }
static String propertyTypeMismatch(Class componentClass, String propertyName, Class actualPropertyType, Class expectedPropertyType) { return _formatter.format("property-type-mismatch", new Object[] { componentClass.getName(), propertyName, ClassFabUtils.getJavaClassName(actualPropertyType), ClassFabUtils.getJavaClassName(expectedPropertyType) }); }
/** @since 1.1 */ public static String paramWrongType(String parameterName, Object parameter, Class expectedType) { return _formatter.format("param-wrong-type", parameterName, ClassFabUtils .getJavaClassName(parameter.getClass()), ClassFabUtils .getJavaClassName(expectedType)); } }
static String classEnhancementFailure(Class baseClass, Throwable cause) { return _formatter.format("class-enhancement-failure", ClassFabUtils .getJavaClassName(baseClass), cause); }
static String classEnhancementFailure(Class baseClass, Throwable cause) { return _formatter.format("class-enhancement-failure", ClassFabUtils .getJavaClassName(baseClass), cause); }
static String incompatibleInjectType(String locator, Object value, Class propertyType) { return _formatter.format("incompatible-inject-type", locator, value, ClassFabUtils .getJavaClassName(propertyType)); }
static String wrongTypeForEnhancement(Class type) { return _formatter.format("wrong-type-for-enhancement", ClassFabUtils .getJavaClassName(type)); }
static String incompatibleInjectType(String locator, Object value, Class propertyType) { return _formatter.format("incompatible-inject-type", locator, value, ClassFabUtils .getJavaClassName(propertyType)); }
static String wrongTypeForPageInjection(String propertyName, Class propertyType) { return _formatter.format("wrong-type-for-page-injection", propertyName, ClassFabUtils .getJavaClassName(propertyType)); }
static String wrongTypeForEnhancement(Class type) { return _formatter.format("wrong-type-for-enhancement", ClassFabUtils .getJavaClassName(type)); }
public String getUniqueId() { StringBuffer buffer = new StringBuffer(_name); buffer.append("("); for (int i = 0; i < count(_parameterTypes); i++) { if (i > 0) buffer.append(","); buffer.append(ClassFabUtils.getJavaClassName(_parameterTypes[i])); } buffer.append(")"); return buffer.toString(); }
public boolean matchMethod(MethodSignature sig) { Class actualType = sig.getParameterTypes()[_parameterIndex]; String actualTypeName = ClassFabUtils.getJavaClassName(actualType); return actualTypeName.equals(_parameterType); }
static String invalidTableSource(IComponent component, Object sourceValue) { return _formatter.format("invalid-table-source", component.getExtendedId(), ClassFabUtils .getJavaClassName(sourceValue.getClass())); }
/** * Returns the name of the value's class, if the value is non-null. */ public String getValueClassName() { Object value = getChange().getNewValue(); if (value == null) return "<null>"; return ClassFabUtils.getJavaClassName(value.getClass()); } }
static String invalidTableColumns(IComponent component, Object columnSource) { return _formatter.format("invalid-table-column", component.getExtendedId(), ClassFabUtils .getJavaClassName(columnSource.getClass())); }