Commit c9be3825 by Mark Wielaard

[multiple changes]

2002-03-24  Eric Blake  <ebb9@email.byu.edu>

        * java/beans/IntrospectionException.java: Update to 1.4.
        * java/beans/PropertyVetoException.java: Ditto.

2002-03-24  Eric Blake  <ebb9@email.byu.edu>

        * gnu/java/beans/BeanInfoEmbryo.java (hasMethod): Use
        Arrays.equals instead of ArrayHelper.equalsArray.

2002-03-24  C. Brian Jones <cbj@gnu.org>

        * java/beans/Introspector.java: added new static final fields
        introduced in 1.2, lots of other updates remain to be done

2002-03-24  C. Brian Jones <cbj@gnu.org>

        * java/beans/Introspector.java: reformatting

2002-03-24  C. Brian Jones <cbj@gnu.org>

        * java/beans/Introspector.java: default beanInfoSearchPath will
        not include sun.beans.infos given we provide no such package and
        the API doesn't really require it; gnu.java.beans.info is the
        default.

2002-03-24  Mark Wielaard  <mark@klomp.org>

        Thanks to Orp developers
        * gnu/java/beans/editors/NativeBooleanEditor.java (setAsText(String)):
        switch TRUE and FALSE return values.

From-SVN: r51273
parent 3ddbb8a9
2002-03-24 Eric Blake <ebb9@email.byu.edu>
* java/beans/IntrospectionException.java: Update to 1.4.
* java/beans/PropertyVetoException.java: Ditto.
2002-03-24 Eric Blake <ebb9@email.byu.edu>
* gnu/java/beans/BeanInfoEmbryo.java (hasMethod): Use
Arrays.equals instead of ArrayHelper.equalsArray.
2002-03-24 C. Brian Jones <cbj@gnu.org>
* java/beans/Introspector.java: added new static final fields
introduced in 1.2, lots of other updates remain to be done
2002-03-24 C. Brian Jones <cbj@gnu.org>
* java/beans/Introspector.java: reformatting
2002-03-24 C. Brian Jones <cbj@gnu.org>
* java/beans/Introspector.java: default beanInfoSearchPath will
not include sun.beans.infos given we provide no such package and
the API doesn't really require it; gnu.java.beans.info is the
default.
2002-03-24 Mark Wielaard <mark@klomp.org>
Thanks to Orp developers
* gnu/java/beans/editors/NativeBooleanEditor.java (setAsText(String)):
switch TRUE and FALSE return values.
2002-03-23 Tom Tromey <tromey@redhat.com> 2002-03-23 Tom Tromey <tromey@redhat.com>
* include/name-finder.h (_Jv_name_finder::myclose): New method. * include/name-finder.h (_Jv_name_finder::myclose): New method.
......
/* gnu.java.beans.BeanInfoEmbryo /* gnu.java.beans.BeanInfoEmbryo
Copyright (C) 1998 Free Software Foundation, Inc. Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -130,14 +130,15 @@ public class BeanInfoEmbryo { ...@@ -130,14 +130,15 @@ public class BeanInfoEmbryo {
} }
public boolean hasMethod(MethodDescriptor m) { public boolean hasMethod(MethodDescriptor m) {
for(int i=0;i<methods.size();i++) { for(int i=0;i<methods.size();i++) {
Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod(); Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod();
if(m.getMethod().getName().equals(thisMethod.getName()) if(m.getMethod().getName().equals(thisMethod.getName())
&& ArrayHelper.equalsArray(m.getMethod().getParameterTypes(), thisMethod.getParameterTypes())) { && Arrays.equals(m.getMethod().getParameterTypes(),
return true; thisMethod.getParameterTypes())) {
} return true;
} }
return false; }
return false;
} }
public void addMethod(MethodDescriptor m) { public void addMethod(MethodDescriptor m) {
methods.addElement(m); methods.addElement(m);
......
/* gnu.java.beans.editors.NativeBooleanEditor /* gnu.java.beans.editors.NativeBooleanEditor
Copyright (C) 1998 Free Software Foundation, Inc. Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -54,12 +54,15 @@ import java.beans.*; ...@@ -54,12 +54,15 @@ import java.beans.*;
public class NativeBooleanEditor extends PropertyEditorSupport { public class NativeBooleanEditor extends PropertyEditorSupport {
String[] tags = {"true","false"}; String[] tags = {"true","false"};
/** setAsText for boolean checks for true or false or t or f. "" also means false. **/ /**
* setAsText for boolean checks for true or false or t or f.
* "" also means false.
**/
public void setAsText(String val) throws IllegalArgumentException { public void setAsText(String val) throws IllegalArgumentException {
if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) { if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) {
setValue(Boolean.FALSE);
} else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
setValue(Boolean.TRUE); setValue(Boolean.TRUE);
} else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
setValue(Boolean.FALSE);
} else { } else {
throw new IllegalArgumentException("Value must be true, false, t, f or empty."); throw new IllegalArgumentException("Value must be true, false, t, f or empty.");
} }
......
/* java.beans.IntrospectionException /* IntrospectionException -- thrown when an exception occurs in introspection
Copyright (C) 1998 Free Software Foundation, Inc. Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -39,19 +39,29 @@ exception statement from your version. */ ...@@ -39,19 +39,29 @@ exception statement from your version. */
package java.beans; package java.beans;
/** /**
** IntrospectionException is thrown when the Introspector fails. Surprise, surprise. * IntrospectionException is thrown when the Introspector fails. Typical
** * causes are the inability to map a name to its Class, or specifying a
** @author John Keiser * wrong type signature.
** @since JDK1.1 *
** @version 1.1.0, 31 May 1998 * @author John Keiser
** @see java.beans.Introspector * @see Introspector
**/ * @since 1.1
* @status updated to 1.4
public class IntrospectionException extends Exception { */
/** Instantiate this exception with the given message. public class IntrospectionException extends Exception
** @param msg the message for the exception. {
**/ /**
public IntrospectionException(String msg) { * Compatible with JDK 1.1+.
super(msg); */
} private static final long serialVersionUID = -3728150539969542619L;
/**
* Instantiate this exception with the given message.
*
* @param msg the message for the exception
*/
public IntrospectionException(String msg)
{
super(msg);
}
} }
/* java.beans.PropertyVetoException /* PropertyVetoException.java -- thrown to veto a proposed property change
Copyright (C) 1998, 2000 Free Software Foundation, Inc. Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -39,30 +39,47 @@ exception statement from your version. */ ...@@ -39,30 +39,47 @@ exception statement from your version. */
package java.beans; package java.beans;
/** /**
** PropertyVetoException is thrown when a VetoableChangeListener doesn't like the proposed change. * PropertyVetoException is thrown when a VetoableChangeListener doesn't
** * like the proposed change.
** @author John Keiser *
** @since JDK1.1 * @author John Keiser
** @version 1.1.0, 31 May 1998 * @see VetoableChangeListener
** @see java.beans.VetoableChangeListener * @since 1.1
**/ * @status updated to 1.4
*/
public class PropertyVetoException extends Exception { public class PropertyVetoException extends Exception
PropertyChangeEvent evt; {
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 129596057694162164L;
private static final long serialVersionUID = 129596057694162164L; /**
* The vetoed change.
*
* @serial the event that was vetoed
*/
private final PropertyChangeEvent evt;
/** Instantiate this exception with the given message and property change. /**
** @param msg the reason for the veto. * Instantiate this exception with the given message and property change.
** @param changeEvent the PropertyChangeEvent that was thrown. *
**/ * @param msg the reason for the veto
public PropertyVetoException(String msg, PropertyChangeEvent changeEvent) { * @param changeEvent the PropertyChangeEvent that was thrown
super(msg); */
evt = changeEvent; public PropertyVetoException(String msg, PropertyChangeEvent changeEvent)
} {
super(msg);
evt = changeEvent;
}
/** Get the PropertyChange event that was vetoed. **/ /**
public PropertyChangeEvent getPropertyChangeEvent() { * Get the PropertyChange event that was vetoed.
return evt; *
} * @return the vetoed change
*/
public PropertyChangeEvent getPropertyChangeEvent()
{
return evt;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment