47 lines
1.5 KiB
Java
47 lines
1.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package com.tridium.sys.registry;
|
|
|
|
import com.tridium.sys.registry.NTypeInfo;
|
|
import com.tridium.sys.registry.RegistryDatabase;
|
|
import java.io.DataInputStream;
|
|
import java.io.DataOutputStream;
|
|
import javax.baja.registry.TypeInfo;
|
|
|
|
public class NAdapterInfo {
|
|
NTypeInfo type;
|
|
NTypeInfo from;
|
|
NTypeInfo to;
|
|
|
|
public boolean isMatch(TypeInfo typeInfo, TypeInfo typeInfo2) {
|
|
if (typeInfo == null) {
|
|
if (typeInfo2 == null) {
|
|
return true;
|
|
}
|
|
return typeInfo2.is(this.to);
|
|
}
|
|
if (typeInfo2 == null) {
|
|
return typeInfo.is(this.from);
|
|
}
|
|
boolean bl = false;
|
|
if (typeInfo.is(this.from) && typeInfo2.is(this.to)) {
|
|
bl = true;
|
|
}
|
|
return bl;
|
|
}
|
|
|
|
void read(RegistryDatabase registryDatabase, DataInputStream dataInputStream) throws Exception {
|
|
this.type = NTypeInfo.readType(registryDatabase, dataInputStream);
|
|
this.from = NTypeInfo.readType(registryDatabase, dataInputStream);
|
|
this.to = NTypeInfo.readType(registryDatabase, dataInputStream);
|
|
}
|
|
|
|
void write(RegistryDatabase registryDatabase, DataOutputStream dataOutputStream) throws Exception {
|
|
NTypeInfo.writeType(registryDatabase, dataOutputStream, this.type);
|
|
NTypeInfo.writeType(registryDatabase, dataOutputStream, this.from);
|
|
NTypeInfo.writeType(registryDatabase, dataOutputStream, this.to);
|
|
}
|
|
}
|
|
|