IndexedPropertySupport.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:incubator-netbeans 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号