194 lines
5.0 KiB
Java
194 lines
5.0 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.sys;
|
|
|
|
import javax.baja.agent.AgentList;
|
|
import javax.baja.data.BIDataValue;
|
|
import javax.baja.spy.SpyWriter;
|
|
import javax.baja.sys.BComplex;
|
|
import javax.baja.sys.BComponent;
|
|
import javax.baja.sys.BIcon;
|
|
import javax.baja.sys.BSimple;
|
|
import javax.baja.sys.BString;
|
|
import javax.baja.sys.BStruct;
|
|
import javax.baja.sys.BValue;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.Lexicon;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public abstract class BObject {
|
|
public static final Type TYPE;
|
|
private static final BIcon icon;
|
|
static /* synthetic */ Class class$javax$baja$sys$BObject;
|
|
|
|
public final boolean isValue() {
|
|
return this instanceof BValue;
|
|
}
|
|
|
|
public final boolean isSimple() {
|
|
return this instanceof BSimple;
|
|
}
|
|
|
|
public final boolean isComplex() {
|
|
return this instanceof BComplex;
|
|
}
|
|
|
|
public final boolean isStruct() {
|
|
return this instanceof BStruct;
|
|
}
|
|
|
|
public final boolean isComponent() {
|
|
return this instanceof BComponent;
|
|
}
|
|
|
|
public final BObject asObject() {
|
|
return this;
|
|
}
|
|
|
|
public final BValue asValue() {
|
|
return (BValue)this;
|
|
}
|
|
|
|
public final BSimple asSimple() {
|
|
return (BSimple)this;
|
|
}
|
|
|
|
public final BComplex asComplex() {
|
|
return (BComplex)this;
|
|
}
|
|
|
|
public final BStruct asStruct() {
|
|
return (BStruct)this;
|
|
}
|
|
|
|
public final BComponent asComponent() {
|
|
return (BComponent)this;
|
|
}
|
|
|
|
public boolean equals(Object object) {
|
|
boolean bl = false;
|
|
if (this == object) {
|
|
bl = true;
|
|
}
|
|
return bl;
|
|
}
|
|
|
|
public boolean equivalent(Object object) {
|
|
return this.equals(object);
|
|
}
|
|
|
|
public boolean isNull() {
|
|
return false;
|
|
}
|
|
|
|
public BIDataValue toDataValue() {
|
|
return BString.make(this.toString());
|
|
}
|
|
|
|
public final AgentList getAgents() {
|
|
return this.getAgents(null);
|
|
}
|
|
|
|
public AgentList getAgents(Context context) {
|
|
return Sys.getRegistry().getAgents(this.getType().getTypeInfo());
|
|
}
|
|
|
|
public Lexicon getLexicon() {
|
|
return this.getType().getModule().getLexicon();
|
|
}
|
|
|
|
public String getTypeDisplayName(Context context) {
|
|
return this.getType().getDisplayName(context);
|
|
}
|
|
|
|
public BIcon getIcon() {
|
|
return icon;
|
|
}
|
|
|
|
public final String toString() {
|
|
return this.toString(null);
|
|
}
|
|
|
|
public String toString(Context context) {
|
|
if (this.getType() != null) {
|
|
return this.getTypeDisplayName(context);
|
|
}
|
|
return this.getClass().getName();
|
|
}
|
|
|
|
public String toDebugString() {
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
if (this.getType() != null) {
|
|
stringBuffer.append(this.getType().toString());
|
|
} else {
|
|
stringBuffer.append(this.getClass().getName());
|
|
}
|
|
int n = System.identityHashCode(this);
|
|
stringBuffer.append(':').append(Integer.toString(n, 36));
|
|
if (this.isComponent()) {
|
|
stringBuffer.append('[');
|
|
BComponent bComponent = this.asComponent();
|
|
if (bComponent.getComponentSpace() != null) {
|
|
stringBuffer.append("h:").append(bComponent.getHandle()).append(" \"").append(bComponent.toPathString()).append('\"');
|
|
} else {
|
|
stringBuffer.append("unmounted");
|
|
}
|
|
stringBuffer.append(']');
|
|
}
|
|
return stringBuffer.toString();
|
|
}
|
|
|
|
public void spy(SpyWriter spyWriter) throws Exception {
|
|
spyWriter.startProps();
|
|
spyWriter.trTitle("Object", 2);
|
|
spyWriter.prop((Object)"type", this.getType());
|
|
spyWriter.prop((Object)"class", this.getClass().getName());
|
|
spyWriter.prop((Object)"toString", this.toString());
|
|
spyWriter.prop((Object)"toDebugString", this.toDebugString());
|
|
spyWriter.endProps();
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public final Object fw(int n) {
|
|
return this.fw(n, null, null, null, null);
|
|
}
|
|
|
|
public Object fw(int n, Object object, Object object2, Object object3, Object object4) {
|
|
return null;
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
protected BObject() {
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$sys$BObject;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$sys$BObject = BObject.class("[Ljavax.baja.sys.BObject;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
icon = BIcon.std("object.png");
|
|
}
|
|
}
|
|
|