JavaTM 2
Platform
Std.  Ed.  v1. 4.0

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  getterName, String  setterName)
          이 constructor 은 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 메소드명을 인수에 취합니다.
PropertyDescriptor (String  propertyName, Method  getter, Method  setter)
          이 constructor 은 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 Method 오브젝트를 인수에 취합니다.
 
메소드의 개요
 boolean equals (Object  obj)
          PropertyDescriptor 와 지정된 오브젝트를 조합합니다.
 Class getPropertyEditorClass ()
          이 프로퍼티의 명시적인 등록이 끝난 PropertyEditor 클래스를 취득합니다.
 Class getPropertyType ()
          프로퍼티의 Class 오브젝트를 취득합니다.
 Method getReadMethod ()
          프로퍼티치의 읽어들여에 사용하는 메소드를 취득합니다.
 Method getWriteMethod ()
          프로퍼티치의 기입해에 사용하는 메소드를 취득합니다.
 boolean isBound ()
          바운드 프로퍼티를 갱신해, 프로퍼티의 변경시에 PropertyChange 이벤트가 방아쇠 되도록(듯이) 합니다.
 boolean isConstrained ()
          제약 프로퍼티의 갱신을 시도해 프로퍼티의 변경시에 VetoableChange 이벤트가 방아쇠 되도록(듯이) 합니다.
 void setBound (boolean bound)
          바운드 프로퍼티를 갱신해, 프로퍼티의 변경시에 PropertyChange 이벤트가 방아쇠 되도록(듯이) 합니다.
 void setConstrained (boolean constrained)
          제약 프로퍼티의 갱신을 시도해 프로퍼티의 변경시에 VetoableChange 이벤트가 방아쇠 되도록(듯이) 합니다.
 void setPropertyEditorClass (Class  propertyEditorClass)
          통상, PropertyEditor 는 PropertyEditorManager 를 사용해 검색됩니다만, 어떠한 이유에 의해 특정의 PropertyEditor 를 지정 프로퍼티에 관련짓고 싶은 경우는 이 메소드를 사용할 수 있습니다.
 void setReadMethod (Method  getter)
          프로퍼티치의 읽어들여에 사용하는 메소드를 설정합니다.
 void setWriteMethod (Method  setter)
          프로퍼티치의 기입해에 사용하는 메소드를 설정합니다.
 
클래스 java.beans. FeatureDescriptor 에서 상속받은 메소드
attributeNames , getDisplayName , getName , getShortDescription , getValue , isExpert , isHidden , isPreferred , setDisplayName , setExpert , setHidden , setName , setPreferred , setShortDescription , setValue
 
클래스 java.lang. Object 에서 상속받은 메소드
clone , finalize , getClass , hashCode , 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  getterName,
                          String  setterName)
                   throws IntrospectionException 
이 constructor 은 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 메소드명을 인수에 취합니다.

파라미터:
propertyName - 프로퍼티의 프로그램명
beanClass - 타겟 bean 의 Class 오브젝트. 예를 들어, sun.beans.OurButton.class
getterName - 프로퍼티치의 읽어내에 사용하는 메소드명. 프로퍼티가 기입해 전용의 경우는 null
setterName - 프로퍼티치의 기입해에 사용하는 메소드명. 프로퍼티가 읽어들여 전용의 경우는 null
예외:
IntrospectionException - 인트로스페크션중에 예외가 발생했을 경우

PropertyDescriptor

public PropertyDescriptor(String  propertyName,
                          Method  getter,
                          Method  setter)
                   throws IntrospectionException 
이 constructor 은 단순한 프로퍼티명과 프로퍼티의 read 및 기입해 용무의 Method 오브젝트를 인수에 취합니다.

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

getPropertyType

public Class  getPropertyType()
프로퍼티의 Class 오브젝트를 취득합니다.

반환값:
프로퍼티의 Java 형 정보. Class 오브젝트는 int 등의 편입의 Java 형을 기술하는 경우가 있으므로 주의한다. 인덱스 없음 액세스를 서포트하지 않는 인덱스 첨부 프로퍼티의 경우, 결과는 null 가 된다

ReadMethod 가 돌려주는 형태


getReadMethod

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

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

setReadMethod

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

파라미터:
getter - 새로운 get 메소드
IntrospectionException

getWriteMethod

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

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

setWriteMethod

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

파라미터:
setter - 새로운 set 메소드
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 가 돌려주어진다

equals

public boolean equals(Object  obj)
PropertyDescriptor 와 지정된 오브젝트를 조합합니다. 양자가 등가인 경우, true 를 돌려줍니다. 읽어내, 기입해, 프로퍼티의 형태, 프로퍼티 에디터, 플래그가 동일하면, 2 개의 PropertyDescriptor 는 등가입니다.

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

JavaTM 2
Platform
Std.  Ed.  v1. 4.0

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

Java, Java 2 D, 및 JDBC 는 미국 및 그 외의 나라에 있어서의 미국 Sun Microsystems, Inc. 의 상표 혹은 등록상표입니다.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.