Author: nickarls
Date: 2008-12-08 05:47:05 -0500 (Mon, 08 Dec 2008)
New Revision: 470
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AnnotationModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/BindingTypeModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypes.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ScopeModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java
Log:
toString simplifications
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AnnotationModel.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AnnotationModel.java 2008-12-08
10:24:07 UTC (rev 469)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AnnotationModel.java 2008-12-08
10:47:05 UTC (rev 470)
@@ -113,17 +113,23 @@
}
/**
- * Gets a string representation of the annotation
+ * Gets a string representation of the annotation model
*
* @return The string representation
*/
@Override
public String toString()
{
+ return (isValid() ? "Valid" : "Invalid") + " annotation
model for " + getType();
+ }
+
+ public String toDetailedString()
+ {
StringBuilder buffer = new StringBuilder();
buffer.append("AnnotationModel:\n");
buffer.append("Annotated annotation: " +
getAnnotatedAnnotation().toString());
buffer.append("Valid: " + isValid());
return buffer.toString();
}
+
}
\ No newline at end of file
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/BindingTypeModel.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/BindingTypeModel.java 2008-12-08
10:24:07 UTC (rev 469)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/BindingTypeModel.java 2008-12-08
10:47:05 UTC (rev 470)
@@ -147,13 +147,18 @@
}
/**
- * Gets a string representation of the stereotype
+ * Gets a string representation of the binding type model
*
* @return The string representation
*/
@Override
public String toString()
{
+ return (isValid() ? "Valid" : "Invalid") + " binding type
model for " + getType() + " with non-binding types " +
getNonBindingTypes();
+ }
+
+ public String toDetailedString()
+ {
StringBuilder buffer = new StringBuilder();
buffer.append("BindingTypeModel:\n");
buffer.append(super.toString());
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypes.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypes.java 2008-12-08
10:24:07 UTC (rev 469)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypes.java 2008-12-08
10:47:05 UTC (rev 470)
@@ -157,6 +157,18 @@
@Override
public String toString()
{
+ return "Merged stereotype model with possible deployment types " +
+ possibleDeploymentTypes + ", required types " + requiredTypes +
+ ", possible scopes " + possibleScopeTypes + " and supported scopes
" + supportedScopes;
+ }
+
+ /**
+ * Gets a string representation of the merged stereotypes
+ *
+ * @return The string representation
+ */
+ public String toDetailedString()
+ {
StringBuilder buffer = new StringBuilder();
buffer.append("Merged stereotypes:\n");
buffer.append("Bean name defaulted: " + beanNameDefaulted +
"\n");
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ScopeModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ScopeModel.java 2008-12-08
10:24:07 UTC (rev 469)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ScopeModel.java 2008-12-08
10:47:05 UTC (rev 470)
@@ -72,13 +72,21 @@
}
/**
- * Gets a string representation of the stereotype
+ * Gets a string representation of the scope model
*
* @return The string representation
*/
@Override
public String toString()
{
+ String valid = isValid() ? "Valid " : "Invalid";
+ String normal = isNormal() ? "normal " : "non-normal ";
+ String passivating = isPassivating() ? "passivating " :
"pon-passivating ";
+ return valid + normal + passivating + " scope model for " + getType();
+ }
+
+ public String toDetailedString()
+ {
StringBuilder buffer = new StringBuilder();
buffer.append("ScopeModel:\n");
buffer.append(super.toString());
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java 2008-12-08
10:24:07 UTC (rev 469)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java 2008-12-08
10:47:05 UTC (rev 470)
@@ -243,6 +243,11 @@
@Override
public String toString()
{
+ return "Stereotype model with required types " + requiredTypes + "
and supported scopes " + supportedScopes;
+ }
+
+ public String toDetailedString()
+ {
StringBuilder buffer = new StringBuilder();
buffer.append("StereotypeModel:\n");
buffer.append(super.toString());
Show replies by date