本文整理了Java中javax.ejb.Singleton.name()
方法的一些代码示例,展示了Singleton.name()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Singleton.name()
方法的具体详情如下:
包路径:javax.ejb.Singleton
类名称:Singleton
方法名:name
暂无
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
/**
* Return the name attribute of given annotation.
* @param annotation
* @return name
*/
protected String getAnnotatedName(Annotation annotation) {
Singleton slAn = (Singleton) annotation;
return slAn.name();
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
/**
* Return the name attribute of given annotation.
* @param annotation
* @return name
*/
protected String getAnnotatedName(Annotation annotation) {
Singleton slAn = (Singleton) annotation;
return slAn.name();
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
private String getEjbName(Singleton singleton, Class<?> beanClass) {
String ejbName = singleton.name().length() == 0 ? beanClass.getSimpleName() : singleton.name();
return ejbName;
}
代码示例来源:origin: org.apache.tomee/openejb-core
private String getEjbName(final Singleton singleton, final Class<?> beanClass) {
return singleton.name().isEmpty() ? beanClass.getSimpleName() : singleton.name();
}
代码示例来源:origin: org.apache.openejb/openejb-core
private String getEjbName(final Singleton singleton, final Class<?> beanClass) {
return singleton.name().isEmpty() ? beanClass.getSimpleName() : singleton.name();
}
代码示例来源:origin: com.sun.jersey/jersey-servlet
private String getName(Class<?> c) {
String name = null;
if (c.isAnnotationPresent(Stateless.class)) {
name = c.getAnnotation(Stateless.class).name();
} else if (c.isAnnotationPresent(Singleton.class)) {
name = c.getAnnotation(Singleton.class).name();
} else {
return null;
}
if (name == null || name.length() == 0) {
name = c.getSimpleName();
}
return name;
}
代码示例来源:origin: com.sun.jersey/jersey-bundle
private String getName(Class<?> c) {
String name = null;
if (c.isAnnotationPresent(Stateless.class)) {
name = c.getAnnotation(Stateless.class).name();
} else if (c.isAnnotationPresent(Singleton.class)) {
name = c.getAnnotation(Singleton.class).name();
} else {
return null;
}
if (name == null || name.length() == 0) {
name = c.getSimpleName();
}
return name;
}
代码示例来源:origin: jersey/jersey-1.x
private String getName(Class<?> c) {
String name = null;
if (c.isAnnotationPresent(Stateless.class)) {
name = c.getAnnotation(Stateless.class).name();
} else if (c.isAnnotationPresent(Singleton.class)) {
name = c.getAnnotation(Singleton.class).name();
} else {
return null;
}
if (name == null || name.length() == 0) {
name = c.getSimpleName();
}
return name;
}
代码示例来源:origin: org.glassfish.tyrus/tyrus-container-glassfish-ejb
private String getName(Class<?> c) {
String name;
if (c.isAnnotationPresent(Singleton.class)) {
name = c.getAnnotation(Singleton.class).name();
} else if (c.isAnnotationPresent(Stateful.class)) {
name = c.getAnnotation(Stateful.class).name();
} else if (c.isAnnotationPresent(Stateless.class)) {
name = c.getAnnotation(Stateless.class).name();
} else {
return null;
}
if (name == null || name.length() == 0) {
name = c.getSimpleName();
}
return name;
}
代码示例来源:origin: eclipse-ee4j/tyrus
private String getName(Class<?> c) {
String name;
if (c.isAnnotationPresent(Singleton.class)) {
name = c.getAnnotation(Singleton.class).name();
} else if (c.isAnnotationPresent(Stateful.class)) {
name = c.getAnnotation(Stateful.class).name();
} else if (c.isAnnotationPresent(Stateless.class)) {
name = c.getAnnotation(Stateless.class).name();
} else {
return null;
}
if (name == null || name.length() == 0) {
name = c.getSimpleName();
}
return name;
}
代码示例来源:origin: org.glassfish.main.webservices/webservices-connector
} else if ((singleton != null) && ((singleton).name() == null || singleton.name().length() > 0)) {
name = singleton.name();
代码示例来源:origin: org.glassfish.main.webservices/webservices-connector
} else if ((singleton != null) && ((singleton).name() == null || singleton.name().length() > 0)) {
name = singleton.name();
代码示例来源:origin: org.apache.openejb/openejb-core
if (annotation != null && specified(annotation.name())) {
return annotation.name();
代码示例来源:origin: org.apache.tomee/openejb-core
if (annotation != null && specified(annotation.name())) {
return annotation.name();
代码示例来源:origin: net.oneandone/ejb-cdi-unit
Singleton singleton = findAnnotation(annotatedType.getJavaClass(),Singleton.class);
if (singleton != null) {
processClass(builder, singleton.name(), true, scopeIsPresent);
modified = true;
if (annotatedType.getAnnotation(Startup.class) != null) {
代码示例来源:origin: org.glassfish.webservices/jsr109-impl
} else if ((singleton != null) &&((singleton).name()==null || singleton.name().length()>0)) {
name = singleton.name();
代码示例来源:origin: com.caucho/resin
if (! "".equals(singleton.name()) && singleton.name() != null)
bean.setEJBName(singleton.name());
代码示例来源:origin: org.jglue.cdi-unit/cdi-unit
Singleton singleton = annotatedType.getAnnotation(Singleton.class);
if (singleton != null) {
processClass(builder, singleton.name());
modified = true;
代码示例来源:origin: BrynCooke/cdi-unit
Singleton singleton = annotatedType.getAnnotation(Singleton.class);
if (singleton != null) {
processClass(builder, singleton.name());
modified = true;
内容来源于网络,如有侵权,请联系作者删除!