if (annotation == null) {
type.setJavaScope(JavaScopeImpl.STATELESS);
return;
}
String name = annotation.value();
JavaScopeImpl scope;
if ("COMPOSITE".equals(name)) {
scope = JavaScopeImpl.COMPOSITE;
} else if ("SESSION".equals(name)) {
scope = JavaScopeImpl.SESSION;
} else if ("CONVERSATION".equals(name)) {
scope = JavaScopeImpl.CONVERSATION;
} else if ("REQUEST".equals(name)) {
scope = JavaScopeImpl.REQUEST;
} else {
scope = new JavaScopeImpl(name);
}
type.setJavaScope(scope);
}