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


Java IndexedPropertyDescriptor.getReadMethod方法代碼示例

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


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

示例4: main

import java.beans.IndexedPropertyDescriptor; //導入方法依賴的package包/類
public static void main(String[] args) throws Exception {
    IndexedPropertyDescriptor ipd = BeanUtils.getIndexedPropertyDescriptor(A.class, "foo");
    if (!ipd.getIndexedPropertyType().equals(String.class)) {
        error(ipd, "A.foo should be String type");
    }
    PropertyDescriptor pd = BeanUtils.findPropertyDescriptor(B.class, "foo");
    if (pd instanceof IndexedPropertyDescriptor) {
        error(pd, "B.foo should not be an indexed property");
    }
    if (!pd.getPropertyType().equals(Date.class)) {
        error(pd, "B.foo should be Date type");
    }
    pd = BeanUtils.findPropertyDescriptor(Child.class, "foo");
    if (pd instanceof IndexedPropertyDescriptor) {
        error(pd, "Child.foo should not be an indexed property");
    }
    pd = BeanUtils.findPropertyDescriptor(Classic.class, "foo");
    if (pd instanceof IndexedPropertyDescriptor) {
        error(pd, "Classic.foo should not be an indexed property");
    }
    ipd = BeanUtils.getIndexedPropertyDescriptor(Index.class, "foo");
    if (!hasIPD(ipd)) {
        error(pd, "Index.foo should have ipd values");
    }
    if (hasPD(ipd)) {
        error(ipd, "Index.foo should not have pd values");
    }
    ipd = BeanUtils.getIndexedPropertyDescriptor(All.class, "foo");
    if (!hasPD(ipd) || !hasIPD(ipd)) {
        error(ipd, "All.foo should have all pd/ipd values");
    }
    if (!isValidType(ipd)) {
        error(ipd, "All.foo pdType should equal ipdType");
    }
    ipd = BeanUtils.getIndexedPropertyDescriptor(Getter.class, "foo");
    if (ipd.getReadMethod() == null || ipd.getWriteMethod() != null) {
        error(ipd, "Getter.foo classic methods incorrect");
    }
    if (!isValidType(ipd)) {
        error(ipd, "Getter.foo pdType should equal ipdType");
    }
    ipd = BeanUtils.getIndexedPropertyDescriptor(BadGetter.class, "foo");
    if (hasPD(ipd)) {
        error(ipd, "BadGetter.foo should not have classic methods");
    }
    ipd = BeanUtils.getIndexedPropertyDescriptor(Setter.class, "foo");
    if (ipd.getReadMethod() != null || ipd.getWriteMethod() == null) {
        error(ipd, "Setter.foo classic methods incorrect");
    }
    if (!isValidType(ipd)) {
        error(ipd, "Setter.foo pdType should equal ipdType");
    }
    ipd = BeanUtils.getIndexedPropertyDescriptor(BadSetter.class, "foo");
    if (hasPD(ipd)) {
        error(ipd, "BadSetter.foo should not have classic methods");
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:58,代碼來源:Test4619536.java

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