Author: nickarls
Date: 2008-12-04 15:36:41 -0500 (Thu, 04 Dec 2008)
New Revision: 406
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
Log:
less flooding from bean toStrings
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2008-12-04
20:03:14 UTC (rev 405)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2008-12-04
20:36:41 UTC (rev 406)
@@ -340,6 +340,36 @@
public String toString()
{
StringBuffer buffer = new StringBuffer();
+ String ejbType = "";
+ if (getEjbMetaData().isMessageDriven())
+ {
+ ejbType = "message driven";
+ }
+ else if (getEjbMetaData().isSingleton())
+ {
+ ejbType = "singleton";
+ }
+ else if (getEjbMetaData().isStateful())
+ {
+ ejbType = "stateful";
+ }
+ else if (getEjbMetaData().isStateless())
+ {
+ ejbType = "stateless";
+ }
+ else
+ {
+ ejbType = "unknown";
+ }
+ buffer.append("Annotated " + getScopeType().getSimpleName().toLowerCase()
+ " " + ejbType + " enterprise bean '" + getName() + "'
" + "[" + getType().getName() + "]\n");
+ buffer.append(" EJB name: " + getEjbMetaData().getEjbName() + ",
default JNDI name: " + getEjbMetaData().getDefaultJndiName() + ", EJB link JNDI
name: " + getEjbMetaData().getEjbLinkJndiName() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types "
+ getBindingTypes() + "\n");
+ return buffer.toString();
+ }
+
+ public String toDetailedString()
+ {
+ StringBuffer buffer = new StringBuffer();
buffer.append("EnterpriseBean:\n");
buffer.append(super.toString() + "\n");
buffer.append(ejbMetaData.toString() + "\n");
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2008-12-04
20:03:14 UTC (rev 405)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2008-12-04
20:36:41 UTC (rev 406)
@@ -361,6 +361,14 @@
public String toString()
{
StringBuffer buffer = new StringBuffer();
+ buffer.append("Annotated " + getScopeType().getSimpleName().toLowerCase()
+ " " + " simple bean '" + getName() + "' " +
"[" + getType().getName() + "]\n");
+ buffer.append(" API types " + getTypes() + ", binding types "
+ getBindingTypes() + "\n");
+ return buffer.toString();
+ }
+
+ public String toDetailedString()
+ {
+ StringBuffer buffer = new StringBuffer();
buffer.append("SimpleBean\n");
buffer.append(super.toString() + "\n");
buffer.append("Location: " + location + "\n");