public final String getDescriptor() { return descriptor; }
public Type.Array makeArray() { return (Type.Array)Type.fromDescriptor("["+descriptor); }
public final String getDescriptor() { return descriptor; }
public Type.Array makeArray() { return (Type.Array)Type.fromDescriptor("["+descriptor); }
public boolean isPrimitive() { return true; }
}
public abstract static class Ref extends Type {
protected Ref(String descriptor) { super(descriptor); }
public boolean isPrimitive() { return true; }
}
public abstract static class Ref extends Type {
protected Ref(String descriptor) { super(descriptor); }
protected Array(Type t) { super("[" + t.getDescriptor()); base = t; }
public Type.Array asArray() { return this; }
public boolean isArray() { return true; }
protected Array(Type t) { super("[" + t.getDescriptor()); base = t; }
public Type.Array asArray() { return this; }
public boolean isArray() { return true; }
- public String debugToString() { return base.debugToString() + "[]"; }
- public Type getElementType() { return Type.fromDescriptor(getDescriptor().substring(0, getDescriptor().length()-1)); }
+ public String toString() { return base.toString() + "[]"; }
+ public Type getElementType() { return base; }
return cf.superType.extendsOrImplements(c, cx);
}
String internalForm() { return descriptor.substring(1, descriptor.length()-1); }
return cf.superType.extendsOrImplements(c, cx);
}
String internalForm() { return descriptor.substring(1, descriptor.length()-1); }
public String getName() { return internalForm().replace('/','.'); }
public String getShortName() {
int p = descriptor.lastIndexOf('/');
return p == -1 ? descriptor.substring(1,descriptor.length()-1) : descriptor.substring(p+1,descriptor.length()-1);
}
private static String _initHelper(String s) {
public String getName() { return internalForm().replace('/','.'); }
public String getShortName() {
int p = descriptor.lastIndexOf('/');
return p == -1 ? descriptor.substring(1,descriptor.length()-1) : descriptor.substring(p+1,descriptor.length()-1);
}
private static String _initHelper(String s) {
public Method method(String name, Type returnType, Type[] argTypes) { return new Method(name, returnType, argTypes); }
public Method method(String name, Type returnType, Type[] argTypes) { return new Method(name, returnType, argTypes); }
if(!s.startsWith("(")) throw new IllegalArgumentException("invalid method type descriptor");
int p = s.indexOf(')');
if(p == -1) throw new IllegalArgumentException("invalid method type descriptor");
if(!s.startsWith("(")) throw new IllegalArgumentException("invalid method type descriptor");
int p = s.indexOf(')');
if(p == -1) throw new IllegalArgumentException("invalid method type descriptor");
public Type.Class getDeclaringClass() { return Type.Class.this; }
public String getName() { return name; }
public abstract String getTypeDescriptor();
public Type.Class getDeclaringClass() { return Type.Class.this; }
public String getName() { return name; }
public abstract String getTypeDescriptor();
private Field(String name, Type t) { super(name); this.type = t; }
public String getTypeDescriptor() { return type.getDescriptor(); }
public Type getType() { return type; }
private Field(String name, Type t) { super(name); this.type = t; }
public String getTypeDescriptor() { return type.getDescriptor(); }
public Type getType() { return type; }
public class Body extends HasAttributes {
public Field getField() { return Field.this; }
public Body(int flags, ClassFile.AttrGen attrs) {
public class Body extends HasAttributes {
public Field getField() { return Field.this; }
public Body(int flags, ClassFile.AttrGen attrs) {
}
public boolean isConstructor() { return getName().equals("<init>"); }
public boolean isClassInitializer() { return getName().equals("<clinit>"); }
}
public boolean isConstructor() { return getName().equals("<init>"); }
public boolean isClassInitializer() { return getName().equals("<clinit>"); }
StringBuffer sb = new StringBuffer();
if (name.equals("<clinit>")) sb.append("static ");
else {
if (name.equals("<init>"))
sb.append(Class.this.getShortName());
else
StringBuffer sb = new StringBuffer();
if (name.equals("<clinit>")) sb.append("static ");
else {
if (name.equals("<init>"))
sb.append(Class.this.getShortName());
else
- public void debugToString(StringBuffer sb, String constructorName) {
+ public boolean isConcrete() { return !isAbstract() && !isNative() /*FIXME: !inAnInterface*/; }
+ public void toString(StringBuffer sb, String constructorName) {
java.util.Hashtable thrownExceptions = getThrownExceptions();
if (thrownExceptions.size() > 0) {
sb.append("throws");
for(java.util.Enumeration e = thrownExceptions.keys();e.hasMoreElements();)
java.util.Hashtable thrownExceptions = getThrownExceptions();
if (thrownExceptions.size() > 0) {
sb.append("throws");
for(java.util.Enumeration e = thrownExceptions.keys();e.hasMoreElements();)