當前位置: 首頁>>代碼示例>>Java>>正文


Java IndexedPropertyDescriptor.getIndexedReadMethod方法代碼示例

本文整理匯總了Java中java.beans.IndexedPropertyDescriptor.getIndexedReadMethod方法的典型用法代碼示例。如果您正苦於以下問題:Java IndexedPropertyDescriptor.getIndexedReadMethod方法的具體用法?Java IndexedPropertyDescriptor.getIndexedReadMethod怎麽用?Java IndexedPropertyDescriptor.getIndexedReadMethod使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.IndexedPropertyDescriptor的用法示例。


在下文中一共展示了IndexedPropertyDescriptor.getIndexedReadMethod方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: _cloneIndexedPropertyDescriptor

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
private static IndexedPropertyDescriptor _cloneIndexedPropertyDescriptor(
  IndexedPropertyDescriptor oldDescriptor
  )
{
  try
  {
    IndexedPropertyDescriptor newDescriptor = new IndexedPropertyDescriptor(
                                    oldDescriptor.getName(),
                                    oldDescriptor.getReadMethod(),
                                    oldDescriptor.getWriteMethod(),
                                    oldDescriptor.getIndexedReadMethod(),
                                    oldDescriptor.getIndexedWriteMethod());

    // copy the rest of the attributes
    _copyPropertyDescriptor(oldDescriptor, newDescriptor);

    return newDescriptor;
  }
  catch (Exception e)
  {
    _LOG.severe(e);
    return null;
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:25,代碼來源:JavaIntrospector.java

示例2: create

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
private static PropertyDescriptor create(PropertyDescriptor pd) {
    try {
        if (pd instanceof IndexedPropertyDescriptor) {
            IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
            return new IndexedPropertyDescriptor(
                    ipd.getName(),
                    ipd.getReadMethod(),
                    ipd.getWriteMethod(),
                    ipd.getIndexedReadMethod(),
                    ipd.getIndexedWriteMethod());
        } else {
            return new PropertyDescriptor(
                    pd.getName(),
                    pd.getReadMethod(),
                    pd.getWriteMethod());
        }
    }
    catch (IntrospectionException exception) {
        exception.printStackTrace();
        return null;
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:23,代碼來源:Test4634390.java

示例3: testIndexedPropertyDescriptor

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
private static void testIndexedPropertyDescriptor(Class type, Class read, Class write) {
    IndexedPropertyDescriptor ipd = BeanUtils.getIndexedPropertyDescriptor(type, "foo");
    if (!read.equals(ipd.getIndexedReadMethod().getDeclaringClass())) {
        throw new Error("unexpected read method: " + ipd.getIndexedReadMethod());
    }
    if (!write.equals(ipd.getIndexedWriteMethod().getDeclaringClass())) {
        throw new Error("unexpected write method: " + ipd.getIndexedWriteMethod());
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:10,代碼來源:Test4918902.java

示例4: hasIPD

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
public static boolean hasIPD(IndexedPropertyDescriptor ipd) {
    if (null == ipd.getIndexedPropertyType()) {
        return false;
    }
    return (null != ipd.getIndexedReadMethod())
        || (null != ipd.getIndexedWriteMethod());
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:8,代碼來源:Test4619536.java

示例5: assertArrayPropertyValuesAreEqual

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
private void assertArrayPropertyValuesAreEqual(final Object o1, final Object o2, final IndexedPropertyDescriptor propertyDescriptor,
		final BeanInfo beanInfo, final List<Difference> differences) throws IllegalArgumentException, IllegalAccessException,
		InvocationTargetException {
	final Method getter = propertyDescriptor.getIndexedReadMethod();
	Method lengthGetter = null;
	for (final PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
		if (pd.getName().equals(propertyDescriptor.getName() + "Length")) {
			lengthGetter = pd.getReadMethod();
		}
	}
	if (lengthGetter != null) {
		final int length = ((Integer) lengthGetter.invoke(o1)).intValue();
		final int length2 = ((Integer) lengthGetter.invoke(o1)).intValue();
		this.propertyStack.push("length");
		BeanDiff.addDiff(differences, createDiff(o1.getClass(), propertyDescriptor.getName(), length, length2));
		this.propertyStack.pop();
		for (int i = 0; i < length; i++) {
			this.propertyStack.push("[" + i + "]");
			final Object val1 = getter.invoke(o1, i);
			final Object val2 = getter.invoke(o2, i);
			if (val1 != null && val2 != null && val1.getClass().getPackage().getName().startsWith(this.packagePrefix)) {
				findDifferences(val1, val2, differences);
			} else {
				BeanDiff.addDiff(differences, createDiff(o1.getClass(), propertyDescriptor.getName(), val1, val2));
			}
			this.propertyStack.pop();
		}
	} else {
		createArrayDiff(o1, o2, differences);
	}
}
 
開發者ID:mklemm,項目名稱:jaxb2-rich-contract-plugin,代碼行數:32,代碼來源:BeanDiff.java

示例6: SimpleIndexedPropertyDescriptor

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
public SimpleIndexedPropertyDescriptor(IndexedPropertyDescriptor original) throws IntrospectionException {
	this(original.getName(), original.getReadMethod(), original.getWriteMethod(),
			original.getIndexedReadMethod(), original.getIndexedWriteMethod());
	copyNonMethodProperties(original, this);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:6,代碼來源:ExtendedBeanInfo.java

示例7: SimpleIndexedPropertyDescriptor

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
public SimpleIndexedPropertyDescriptor(IndexedPropertyDescriptor original) throws IntrospectionException {
	this(original.getName(), original.getReadMethod(), original.getWriteMethod(),
			original.getIndexedReadMethod(), original.getIndexedWriteMethod());
	PropertyDescriptorUtils.copyNonMethodProperties(original, this);
}
 
開發者ID:langtianya,項目名稱:spring4-understanding,代碼行數:6,代碼來源:ExtendedBeanInfo.java


注:本文中的java.beans.IndexedPropertyDescriptor.getIndexedReadMethod方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。