public void setValue(T val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
if (!canWrite()) {
throw new IllegalAccessException();
}
Object validInstance = Beans.getInstanceOf(instance, setter.getDeclaringClass());
Object value = val;
if (
(val != null) && (setter.getParameterTypes()[0].getComponentType().isPrimitive()) &&
(!val.getClass().getComponentType().isPrimitive())
) {
value = Utilities.toPrimitiveArray((Object[]) val);
}
setter.invoke(validInstance, value);
}
IndexedPropertySupport.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录