105 lines
3.4 KiB
Java
105 lines
3.4 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.space;
|
|
|
|
import javax.baja.agent.AgentFilter;
|
|
import javax.baja.agent.AgentList;
|
|
import javax.baja.agent.NoSuchAgentException;
|
|
import javax.baja.naming.BISession;
|
|
import javax.baja.naming.BOrd;
|
|
import javax.baja.naming.BOrdScheme;
|
|
import javax.baja.naming.InvalidOrdBaseException;
|
|
import javax.baja.naming.OrdQuery;
|
|
import javax.baja.naming.OrdTarget;
|
|
import javax.baja.naming.SyntaxException;
|
|
import javax.baja.naming.UnresolvedException;
|
|
import javax.baja.nav.BNavContainer;
|
|
import javax.baja.space.BSpace;
|
|
import javax.baja.sys.BObject;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public abstract class BSpaceScheme
|
|
extends BOrdScheme {
|
|
public static final Type TYPE;
|
|
static /* synthetic */ Class class$javax$baja$space$BSpaceScheme;
|
|
|
|
public OrdTarget resolve(OrdTarget ordTarget, OrdQuery ordQuery) throws SyntaxException, UnresolvedException {
|
|
BSpace bSpace;
|
|
block3: {
|
|
BISession bISession = this.toSession(ordTarget.get());
|
|
bSpace = (BSpace)bISession.getNavChild(this.getId());
|
|
if (bSpace == null) {
|
|
try {
|
|
bSpace = this.makeSpaceForSession(bISession);
|
|
((BNavContainer)((Object)bISession)).addNavChild(bSpace);
|
|
}
|
|
catch (RuntimeException runtimeException) {
|
|
bSpace = (BSpace)bISession.getNavChild(this.getId());
|
|
if (bSpace != null) break block3;
|
|
throw runtimeException;
|
|
}
|
|
}
|
|
}
|
|
return this.resolve(ordTarget, ordQuery, bSpace);
|
|
}
|
|
|
|
public BISession toSession(BObject bObject) {
|
|
BISession bISession = BOrd.toSession(bObject);
|
|
if (bISession != null) {
|
|
return bISession;
|
|
}
|
|
throw new InvalidOrdBaseException("" + bObject);
|
|
}
|
|
|
|
public BSpace makeSpaceForSession(BISession bISession) {
|
|
Type type = this.getSpaceType();
|
|
try {
|
|
AgentList agentList = bISession.asObject().getAgents();
|
|
agentList = agentList.filter(AgentFilter.is(type));
|
|
return (BSpace)agentList.getDefault().getInstance();
|
|
}
|
|
catch (NoSuchAgentException noSuchAgentException) {
|
|
throw new InvalidOrdBaseException("Cannot find impl of " + type + " for " + bISession.getType());
|
|
}
|
|
}
|
|
|
|
public abstract Type getSpaceType();
|
|
|
|
public abstract OrdTarget resolve(OrdTarget var1, OrdQuery var2, BSpace var3);
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
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 BSpaceScheme(String string) {
|
|
super(string);
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$space$BSpaceScheme;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$space$BSpaceScheme = BSpaceScheme.class("[Ljavax.baja.space.BSpaceScheme;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
}
|
|
}
|
|
|