public class IndexedPropertyDescriptor extends PropertyDescriptor
索引属性也可以提供简单的非索引的读写方法。如果这些是存在的,他们读写数组的类型返回的索引读取方法。
| Constructor and Description |
|---|
IndexedPropertyDescriptor(String propertyName, 类<?> beanClass)
此构造函数构造如下标准java公约通过getFoo和setFoo这种访问方法的性能indexedpropertydescriptor,对于索引存取和访问数组。
|
IndexedPropertyDescriptor(String propertyName, 类<?> beanClass, String readMethodName, String writeMethodName, String indexedReadMethodName, String indexedWriteMethodName)
此构造函数以一个简单的属性的名称,和用于读和写属性的方法名称,索引和非索引。
|
IndexedPropertyDescriptor(String propertyName, 方法 readMethod, 方法 writeMethod, 方法 indexedReadMethod, 方法 indexedWriteMethod)
此构造函数以一个简单的属性的名称,和用于读和写属性的方法对象。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
比较这
PropertyDescriptor与指定对象。
|
类<?> |
getIndexedPropertyType()
返回索引属性的java类型信息。
|
方法 |
getIndexedReadMethod()
获取应用于读取索引属性值的方法。
|
方法 |
getIndexedWriteMethod()
获取应用于写入索引属性值的方法。
|
int |
hashCode()
返回一个对象的哈希代码值。
|
void |
setIndexedReadMethod(方法 readMethod)
设置应用于读取索引属性值的方法。
|
void |
setIndexedWriteMethod(方法 writeMethod)
设置应用于写入索引属性值的方法。
|
createPropertyEditor, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethodattributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue, toStringpublic IndexedPropertyDescriptor(String propertyName, 类<?> beanClass) throws IntrospectionException
因此,如果参数的名字是“弗莱德”,它会假定有一个索引器法”getfred”,非索引(阵列)的读者的方法也被称为“getfred”,索引作家法”setfred”,最后一个非索引的方法”setfred”作家。
propertyName -房地产专业名称。
beanClass -目标bean类对象。
IntrospectionException -如果在反思发生异常。
public IndexedPropertyDescriptor(String propertyName, 类<?> beanClass, String readMethodName, String writeMethodName, String indexedReadMethodName, String indexedWriteMethodName) throws IntrospectionException
propertyName -房地产专业名称。
beanClass -目标bean类对象。
readMethodName -用于读取属性值为数组的方法的名称。如果属性仅为写或必须被索引,则可能为空。
writeMethodName -用来写作的属性值为数组的方法的名称。如果属性是只读的或必须被索引,则可能为空。
indexedReadMethodName -用于读取索引属性值的方法的名称。可能是无效的,如果属性是只写。
indexedWriteMethodName -用于写索引属性值的方法的名称。如果属性是只读的,则可能为空。
IntrospectionException -如果在反思发生异常。
public IndexedPropertyDescriptor(String propertyName, 方法 readMethod, 方法 writeMethod, 方法 indexedReadMethod, 方法 indexedWriteMethod) throws IntrospectionException
propertyName -房地产专业名称。
readMethod -用于读取属性值为数组的方法。如果属性仅为写或必须被索引,则可能为空。
writeMethod -用于写入属性值为数组的方法。如果属性是只读的或必须被索引,则可能为空。
indexedReadMethod -用于读取索引属性值的方法。可能是无效的,如果属性是只写。
indexedWriteMethod -用于写索引属性值的方法。如果属性是只读的,则可能为空。
IntrospectionException -如果在反思发生异常。
public 方法 getIndexedReadMethod()
public void setIndexedReadMethod(方法 readMethod) throws IntrospectionException
readMethod -新的索引读取方法。
IntrospectionException -如果在反思发生异常。
public 方法 getIndexedWriteMethod()
public void setIndexedWriteMethod(方法 writeMethod) throws IntrospectionException
writeMethod -新的索引写入方法。
IntrospectionException -如果在反思发生异常。
public 类<?> getIndexedPropertyType()
类对象可以描述原始java类型如
int。这种类型是由索引读取方法返回的或作为索引写入方法的参数类型使用的。
类对象,或
null如果无法确定类型
public boolean equals(Object obj)
PropertyDescriptor与指定对象。如果对象是相同的,则返回真。两
PropertyDescriptors是相同的如果读、写、属性类型、属性编辑器和旗帜是等价的。
equals 方法重写,继承类
PropertyDescriptor
obj -参考对象的比较。
true obj参数相同;
false否则。
Object.hashCode(),
HashMap
public int hashCode()
Object.hashCode()。
hashCode 方法重写,继承类
PropertyDescriptor
Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.