JavaTM Platform
Standard Ed. 6

java.beans
클래스 PropertyDescriptor

java.lang.Object 
  상위를 확장 java.beans.FeatureDescriptor 
      상위를 확장 java.beans.PropertyDescriptor
직계의 기존의 서브 클래스:
IndexedPropertyDescriptor


public class PropertyDescriptor
extends FeatureDescriptor

PropertyDescriptor 는, Java Bean 가 한 벌의 액세스용 메소드를 사용해 export 하는 단일의 프로퍼티을 기술합니다.


생성자 의 개요
PropertyDescriptor (String  propertyName, Class <? > beanClass)
          액세스용 메소드 getFoo 및 setFoo 를 사용해, 표준의 Java 규약에 준거하고 있는 프로퍼티의 PropertyDescriptor 를 구축합니다.
PropertyDescriptor (String  propertyName, Class <? > beanClass, String  readMethodName, String  writeMethodName)
          이 생성자 은, 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 메소드명을 인수에 취합니다.
PropertyDescriptor (String  propertyName, Method  readMethod, Method  writeMethod)
          이 생성자 은, 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 Method 객체를 인수에 취합니다.
 
메소드의 개요
 PropertyEditor createPropertyEditor (Object  bean)
          현재의 프로퍼티 에디터 클래스를 사용해 프로퍼티 에디터의 인스턴스를 구축합니다.
 boolean equals (Object  obj)
          PropertyDescriptor 가 지정된 객체와 비교합니다.
 Class <? > getPropertyEditorClass ()
          이 프로퍼티의 명시적인 등록이 끝난 PropertyEditor 클래스를 가져옵니다.
 Class <? > getPropertyType ()
          프로퍼티의 Class 객체를 가져옵니다.
 Method getReadMethod ()
          프로퍼티치의 읽어들여에 사용하는 메소드를 가져옵니다.
 Method getWriteMethod ()
          프로퍼티치의 기입해에 사용하는 메소드를 가져옵니다.
 int hashCode ()
          객체의 해시 코드값를 돌려줍니다.
 boolean isBound ()
          바운드 프로퍼티을 갱신해, 프로퍼티의 변경시에 PropertyChange 이벤트가 트리거되도록(듯이) 합니다.
 boolean isConstrained ()
          제약 프로퍼티의 갱신을 시도해 프로퍼티의 변경시에 VetoableChange 이벤트가 트리거되도록(듯이) 합니다.
 void setBound (boolean bound)
          바운드 프로퍼티을 갱신해, 프로퍼티의 변경시에 PropertyChange 이벤트가 트리거되도록(듯이) 합니다.
 void setConstrained (boolean constrained)
          제약 프로퍼티의 갱신을 시도해 프로퍼티의 변경시에 VetoableChange 이벤트가 트리거되도록(듯이) 합니다.
 void setPropertyEditorClass (Class <? > propertyEditorClass)
          일반적으로, PropertyEditor 는 PropertyEditorManager 를 사용해 검색됩니다.
 void setReadMethod (Method  readMethod)
          프로퍼티치의 읽어들여에 사용하는 메소드를 설정합니다.
 void setWriteMethod (Method  writeMethod)
          프로퍼티치의 기입해에 사용하는 메소드를 설정합니다.
 
클래스 java.beans. FeatureDescriptor 로부터 상속된 메소드
attributeNames , getDisplayName , getName , getShortDescription , getValue , isExpert , isHidden , isPreferred , setDisplayName , setExpert , setHidden , setName , setPreferred , setShortDescription , setValue
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , finalize , getClass , notify , notifyAll , toString , wait , wait , wait
 

생성자 의 상세

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Class <? > beanClass)
                   throws IntrospectionException 
액세스용 메소드 getFoo 및 setFoo 를 사용해, 표준의 Java 규약에 준거하고 있는 프로퍼티의 PropertyDescriptor 를 구축합니다. 인수명이 fred 이면, 기입용 메소드는 setFred, read용 메소드는 getFred (boolean 프로퍼티에서는 isFred)가 됩니다. 프로퍼티명은 소문자로 시작됩니다만, 메소드명에서는 선두 문자가 대문자가 됩니다.

파라미터:
propertyName - 프로퍼티의 프로그램명
beanClass - 타겟 Bean 의 Class 객체. 예를 들어 sun.beans.OurButton.class
예외:
IntrospectionException - 인트로스페크션중에 예외가 발생했을 경우

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Class <? > beanClass,
                          String  readMethodName,
                          String  writeMethodName)
                   throws IntrospectionException 
이 생성자 은, 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 메소드명을 인수에 취합니다.

파라미터:
propertyName - 프로퍼티의 프로그램명
beanClass - 타겟 Bean 의 Class 객체. 예를 들어 sun.beans.OurButton.class
readMethodName - 프로퍼티치의 읽어들여에 사용하는 메소드명. 속성이 기입해 전용의 경우는 null
writeMethodName - 프로퍼티치의 기입해에 사용하는 메소드명. 속성이 읽어들여 전용의 경우는 null
예외:
IntrospectionException - 인트로스페크션중에 예외가 발생했을 경우

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Method  readMethod,
                          Method  writeMethod)
                   throws IntrospectionException 
이 생성자 은, 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 Method 객체를 인수에 취합니다.

파라미터:
propertyName - 프로퍼티의 프로그램명
readMethod - 프로퍼티치의 읽어들여에 사용하는 메소드. 속성이 기입해 전용의 경우는 null
writeMethod - 프로퍼티치의 기입해에 사용하는 메소드. 속성이 읽어들여 전용의 경우는 null
예외:
IntrospectionException - 인트로스페크션중에 예외가 발생했을 경우
메소드의 상세

getPropertyType

public Class <? > getPropertyType()
프로퍼티의 Class 객체를 가져옵니다.

반환값:
프로퍼티의 Java 형 정보. Class 객체는, int 등의 편입의 Java 형을 기술하는 경우가 있다. 인덱스 없음 액세스를 지원하지 않는 인덱스 첨부 프로퍼티의 경우, 결과는 null 의 경우도 있다

ReadMethod 가 돌려주는 형태


getReadMethod

public Method  getReadMethod()
프로퍼티치의 읽어들여에 사용하는 메소드를 가져옵니다.

반환값:
프로퍼티치의 읽어들여에 사용하는 메소드. 프로퍼티을 읽어들일 수 없는 경우는 null

setReadMethod

public void setReadMethod(Method  readMethod)
                   throws IntrospectionException 
프로퍼티치의 읽어들여에 사용하는 메소드를 설정합니다.

파라미터:
readMethod - 새로운 read 메소드
예외:
IntrospectionException

getWriteMethod

public Method  getWriteMethod()
프로퍼티치의 기입해에 사용하는 메소드를 가져옵니다.

반환값:
프로퍼티치의 기입해에 사용하는 메소드. 프로퍼티을 기입할 수 없는 경우는 null

setWriteMethod

public void setWriteMethod(Method  writeMethod)
                    throws IntrospectionException 
프로퍼티치의 기입해에 사용하는 메소드를 설정합니다.

파라미터:
writeMethod - 새로운 기입 메소드
예외:
IntrospectionException

isBound

public boolean isBound()
바운드 프로퍼티을 갱신해, 프로퍼티의 변경시에 PropertyChange 이벤트가 트리거되도록(듯이) 합니다.

반환값:
바운드 프로퍼티의 경우는 true

setBound

public void setBound(boolean bound)
바운드 프로퍼티을 갱신해, 프로퍼티의 변경시에 PropertyChange 이벤트가 트리거되도록(듯이) 합니다.

파라미터:
bound - 바운드 프로퍼티의 경우는 true

isConstrained

public boolean isConstrained()
제약 프로퍼티의 갱신을 시도해 프로퍼티의 변경시에 VetoableChange 이벤트가 트리거되도록(듯이) 합니다.

반환값:
제약 프로퍼티의 경우는 true

setConstrained

public void setConstrained(boolean constrained)
제약 프로퍼티의 갱신을 시도해 프로퍼티의 변경시에 VetoableChange 이벤트가 트리거되도록(듯이) 합니다.

파라미터:
constrained - 제약 프로퍼티의 경우는 true

setPropertyEditorClass

public void setPropertyEditorClass(Class <? > propertyEditorClass)
일반적으로, PropertyEditor 는 PropertyEditorManager 를 사용해 검색됩니다. 그러나 어떠한 이유에 의해 특정의 PropertyEditor 를 지정 프로퍼티에 관련짓고 싶은 경우는, 이 메소드를 사용할 수 있습니다.

파라미터:
propertyEditorClass - PropertyEditor 의 Class

getPropertyEditorClass

public Class <? > getPropertyEditorClass()
이 프로퍼티의 명시적인 등록이 끝난 PropertyEditor 클래스를 가져옵니다.

반환값:
이 프로퍼티의 명시적인 등록이 끝난 PropertyEditor 클래스. 일반적으로은, 특별한 에디터가 등록되지 않기 때문에 PropertyEditorManager 를 사용해 적절한 PropertyEditor 를 검색해야 하는 것인 것을 가리키는 null 가 반환된다

createPropertyEditor

public PropertyEditor  createPropertyEditor(Object  bean)
현재의 프로퍼티 에디터 클래스를 사용해 프로퍼티 에디터의 인스턴스를 구축합니다.

프로퍼티 에디터 클래스에 Object 인수를 취하는 public 생성자 이 있는 경우, Bean 파라미터를 인수로서 사용해 불려 갑니다. 그 이외의 경우, 디폴트의 생성자 이 불려 갑니다.

파라미터:
bean - 소스 객체
반환값:
프로퍼티 에디터의 인스턴스. 또는, 프로퍼티 에디터를 정의하고 있지 않는 경우나 작성할 수 없는 경우는 null
도입된 버젼:
1.5

equals

public boolean equals(Object  obj)
PropertyDescriptor 가 지정된 객체와 비교합니다. 객체가 같은 경우에는 true 를 돌려줍니다. 읽어들여, 기입해, 프로퍼티의 형태, 프로퍼티 에디터, 및 플래그가 동일하면, 2 개의 PropertyDescriptor 는 등가입니다.

오버라이드(override):
클래스 Object 내의 equals
파라미터:
obj - 비교 대상의 참조 객체
반환값:
obj 인수로 지정된 객체와 이 객체가 동일한 경우는 true, 그렇지 않은 경우는 false
도입된 버젼:
1.4
관련 항목:
Object.hashCode() , Hashtable

hashCode

public int hashCode()
객체의 해시 코드값를 돌려줍니다. 상세한 것에 대하여는,Object.hashCode() 를 참조해 주세요.

오버라이드(override):
클래스 Object 내의 hashCode
반환값:
이 객체의 해시 코드값
도입된 버젼:
1.5
관련 항목:
Object.equals(java.lang.Object) , Hashtable

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.