70 lines
1.4 KiB
Java
70 lines
1.4 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package com.tridium.sys.schema;
|
|
|
|
import com.tridium.sys.schema.NSlot;
|
|
import javax.baja.sys.Action;
|
|
import javax.baja.sys.BFacets;
|
|
import javax.baja.sys.Property;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Topic;
|
|
import javax.baja.sys.Type;
|
|
|
|
public class NTopic
|
|
extends NSlot
|
|
implements Topic {
|
|
Class eventClass;
|
|
Type eventType;
|
|
|
|
public final boolean isProperty() {
|
|
return false;
|
|
}
|
|
|
|
public final boolean isAction() {
|
|
return false;
|
|
}
|
|
|
|
public final boolean isTopic() {
|
|
return true;
|
|
}
|
|
|
|
public final Property asProperty() {
|
|
throw new ClassCastException();
|
|
}
|
|
|
|
public final Action asAction() {
|
|
throw new ClassCastException();
|
|
}
|
|
|
|
public final Topic asTopic() {
|
|
return this;
|
|
}
|
|
|
|
public Type getEventType() {
|
|
if (this.eventClass == null) {
|
|
return null;
|
|
}
|
|
if (this.eventType == null) {
|
|
this.eventType = Sys.getType(this.eventClass);
|
|
}
|
|
return this.eventType;
|
|
}
|
|
|
|
void copyFrom(NSlot nSlot) {
|
|
super.copyFrom(nSlot);
|
|
NTopic nTopic = (NTopic)nSlot;
|
|
this.eventClass = nTopic.eventClass;
|
|
this.eventType = nTopic.eventType;
|
|
}
|
|
|
|
public String toString() {
|
|
return this.name + "! " + this.getEventType();
|
|
}
|
|
|
|
public NTopic(int n, BFacets bFacets) {
|
|
super(null, n, bFacets, true);
|
|
}
|
|
}
|
|
|