IJRemote currentRemoteInterfaces = sessionBean.getRemoteInterfaces();
// Get all interfaces of the bean
String[] interfaces = sessionBean.getInterfaces();
for (String itf : interfaces) {
EasyBeansEjbJarClassMetadata itfAnnotationMetadata = sessionBean.getLinkedClassMetadata(itf);
// Interface was analyzed, try to see the type of the interface
if (itfAnnotationMetadata != null) {
// Report type of interface in the bean
IJLocal jLocal = itfAnnotationMetadata.getLocalInterfaces();
if (jLocal != null) {
if (currentLocalInterfaces == null) {
currentLocalInterfaces = new JLocal();
sessionBean.setLocalInterfaces(currentLocalInterfaces);
}
String itfName = itfAnnotationMetadata.getClassName();
if (!currentLocalInterfaces.getInterfaces().contains(itfName)) {
currentLocalInterfaces.addInterface(itfName);
}
}
// Report type of interface in the bean
IJRemote jRemote = itfAnnotationMetadata.getRemoteInterfaces();
if (jRemote != null) {
if (currentRemoteInterfaces == null) {
currentRemoteInterfaces = new JRemote();
sessionBean.setRemoteInterfaces(currentRemoteInterfaces);
}
String itfName = itfAnnotationMetadata.getClassName();
if (!currentRemoteInterfaces.getInterfaces().contains(itfName)) {
currentRemoteInterfaces.addInterface(itfName);
}
}
}