121 lines
3.5 KiB
Java
121 lines
3.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.util;
|
|
|
|
import javax.baja.naming.BOrd;
|
|
import javax.baja.space.BComponentSpace;
|
|
import javax.baja.sys.Action;
|
|
import javax.baja.sys.BComponent;
|
|
import javax.baja.sys.BFacets;
|
|
import javax.baja.sys.BLink;
|
|
import javax.baja.sys.BTopic;
|
|
import javax.baja.sys.Slot;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Topic;
|
|
import javax.baja.sys.Type;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BCompositeTopic
|
|
extends BTopic {
|
|
public static final Type TYPE;
|
|
static /* synthetic */ Class class$javax$baja$util$BCompositeTopic;
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public Mirror getMirror() {
|
|
try {
|
|
BComponent bComponent = this.getParentComponent();
|
|
if (bComponent == null) {
|
|
return null;
|
|
}
|
|
BComponentSpace bComponentSpace = bComponent.getComponentSpace();
|
|
if (bComponentSpace == null) {
|
|
return null;
|
|
}
|
|
BLink[] bLinkArray = bComponent.getLinks(this.getPropertyInParent());
|
|
if (bLinkArray.length == 0) {
|
|
return null;
|
|
}
|
|
BLink bLink = bLinkArray[0];
|
|
BOrd bOrd = bLink.getSourceOrd();
|
|
String string = bLink.getSourceSlotName();
|
|
BComponent bComponent2 = (BComponent)bOrd.get(bComponentSpace);
|
|
Slot slot = bComponent2.getSlot(string);
|
|
if (slot == this.getPropertyInParent()) {
|
|
return null;
|
|
}
|
|
if (slot instanceof Topic || slot instanceof Action) {
|
|
return new Mirror(bLink, bComponent2, slot);
|
|
}
|
|
return null;
|
|
}
|
|
catch (Exception exception) {
|
|
exception.printStackTrace();
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public Type getEventType() {
|
|
Mirror mirror = this.getMirror();
|
|
if (mirror != null) {
|
|
Slot slot = mirror.slot;
|
|
if (slot.isAction()) {
|
|
return slot.asAction().getParameterType();
|
|
}
|
|
return slot.asTopic().getEventType();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public BFacets getFacets() {
|
|
Mirror mirror = this.getMirror();
|
|
if (mirror != null) {
|
|
return mirror.component.getSlotFacets(mirror.slot);
|
|
}
|
|
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());
|
|
}
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$util$BCompositeTopic;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$util$BCompositeTopic = BCompositeTopic.class("[Ljavax.baja.util.BCompositeTopic;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
}
|
|
|
|
public static class Mirror {
|
|
public BLink link;
|
|
public BComponent component;
|
|
public Slot slot;
|
|
|
|
public String toString() {
|
|
return this.component.toPathString() + '.' + this.slot.getName();
|
|
}
|
|
|
|
public Mirror(BLink bLink, BComponent bComponent, Slot slot) {
|
|
this.link = bLink;
|
|
this.component = bComponent;
|
|
this.slot = slot;
|
|
}
|
|
}
|
|
}
|
|
|