[e-lang] Joe-E reflection API questions
Mark Miller
erights at gmail.com
Wed Apr 18 17:04:46 CDT 2007
Oops. The Reflection class I just sent also depends on Tyler's old
NoSuchMember class, which I revived without examination. I include
NoSuchMember below. I notice that it violates the common Java
convention that exception class names end with the suffix "Exception".
Another Joe-E class also violates this convention: InvalidFilename. I
suggest that we change both to follow the Java convention, even though
ref_send doesn't. I think Joe-E should stay more strictly close to
Java conventions than ref_send should.
------------------------------
// Copyright 2006 Regents of the University of California. May be used
// under the terms of the revised BSD license. See LICENSING for details.
package org.joe_e.reflection;
import org.joe_e.Powerless;
/**
* Indicates a named class member does not exist, or is not allowed.
*/
public class
NoSuchMember extends RuntimeException implements Powerless {
static private final long serialVersionUID = 1L;
/**
* a static member was asked for
*/
public final boolean statics;
/**
* the searched type
*/
public final Class type;
/**
* the asked for member name
*/
public final String name;
/**
* Constructs an instance.
* @param statics {@link #statics}
* @param type {@link #type}
* @param name {@link #name}
*/
public
NoSuchMember(final boolean statics,
final Class type,
final String name) {
this.statics = statics;
this.type = type;
this.name = name;
}
// java.lang.Throwable interface
public String
getMessage() { return type.getName() + "#" + name; }
}
More information about the e-lang
mailing list