[webbeans-commits] Webbeans SVN: r349 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: bean and 5 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Nov 21 06:00:56 EST 2008
Author: nickarls
Date: 2008-11-21 06:00:56 -0500 (Fri, 21 Nov 2008)
New Revision: 349
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/MergedStereotypes.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlEnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlSimpleBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/SessionBeanMap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.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/ScopeModel.java
Log:
toStrings
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -663,40 +663,36 @@
{
StringBuffer buffer = new StringBuffer();
- buffer.append("Enabled deployment types:\n");
+ buffer.append("Enabled deployment types: " + enabledDeploymentTypes.size() + "\n");
+ int i = 0;
for (Class<? extends Annotation> deploymentType : enabledDeploymentTypes)
{
- buffer.append(" " + deploymentType.getName() + "\n");
+ buffer.append(++i + " - " + deploymentType.getName() + "\n");
}
-
- buffer.append(eventManager.toString());
- buffer.append(metaDataCache.toString());
-
- buffer.append("Resolver:\n");
- buffer.append(resolver.toString());
-
- buffer.append("Context map:\n");
- buffer.append(contextMap.toString());
-
- buffer.append("Proxy pool:\n");
- buffer.append(proxyPool.toString());
-
+ buffer.append(eventManager.toString() + "\n");
+ buffer.append(metaDataCache.toString() + "\n");
+ buffer.append(resolver.toString() + "\n");
+ buffer.append(contextMap.toString() + "\n");
+ buffer.append(proxyPool.toString() + "\n");
buffer.append("Registered beans: " + beans.size() + "\n");
+ i = 0;
for (Bean<?> bean : beans)
{
- buffer.append(" " + bean.toString() + "\n");
+ buffer.append(++i + " - " + bean.toString() + "\n");
}
buffer.append("Registered decorators: " + decorators.size() + "\n");
+ i = 0;
for (Decorator decorator : decorators)
{
- buffer.append(" " + decorator.toString() + "\n");
+ buffer.append(++i + " - " + decorator.toString() + "\n");
}
buffer.append("Registered interceptors: " + interceptors.size() + "\n");
+ i = 0;
for (Interceptor interceptor : interceptors)
{
- buffer.append(" " + interceptor.toString() + "\n");
+ buffer.append(++i + " - " + interceptor.toString() + "\n");
}
return buffer.toString();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -61,7 +61,38 @@
{
return delegate;
}
-
+
+ @Override
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Binding types " + bindingTypes.size() + "\n");
+ int i = 0;
+ for (Entry<Class<? extends Annotation>, BindingTypeModel<?>> entry : bindingTypes.entrySet())
+ {
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString() + "\n");
+ }
+ buffer.append("EJB metadata " + ejbMetaDataMap.size() + "\n");
+ i = 0;
+ for (Entry<Class<?>, EjbMetaData<?>> entry : ejbMetaDataMap.entrySet())
+ {
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString());
+ }
+ buffer.append("Scopes " + scopes.size() + "\n");
+ i = 0;
+ for (Entry<Class<? extends Annotation>, ScopeModel<?>> entry : scopes.entrySet())
+ {
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString());
+ }
+ buffer.append("Stereotypes " + stereotypes.size() + "\n");
+ i = 0;
+ for (Entry<Class<? extends Annotation>, StereotypeModel<?>> entry : stereotypes.entrySet())
+ {
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString());
+ }
+ return buffer.toString();
+ }
+
}
@SuppressWarnings("unchecked")
@@ -80,6 +111,15 @@
return new ScopeModel<S>(type);
}
+ @Override
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Scope model map\n");
+ buffer.append(super.toString() + "\n");
+ return buffer.toString();
+ }
+
}
@SuppressWarnings("unchecked")
@@ -99,24 +139,11 @@
}
@Override
- public String toString() {
+ public String toString()
+ {
StringBuffer buffer = new StringBuffer();
- buffer.append("Binding types\n");
- for (Entry<Class<? extends Annotation>, BindingTypeModel<?>> entry : delegate.entrySet()) {
- buffer.append(entry.getKey().getName() + ": " + entry.getValue().toString() + "\n");
- }
- buffer.append("EJB metadata\n");
- for (Entry<Class<?>, EjbMetaData<?>> entry : ejbMetaDataMap.entrySet()) {
- buffer.append(entry.getKey().getName() + ": " + entry.getValue().toString());
- }
- buffer.append("Scopes\n");
- for (Entry<Class<? extends Annotation>, ScopeModel<?>> entry : scopes.entrySet()) {
- buffer.append(entry.getKey().getName() + ": " + entry.getValue().toString());
- }
- buffer.append("Stereotypes\n");
- for (Entry<Class<? extends Annotation>, StereotypeModel<?>> entry : stereotypes.entrySet()) {
- buffer.append(entry.getKey().getName() + ": " + entry.getValue().toString());
- }
+ buffer.append("Binding type model map\n");
+ buffer.append(super.toString() + "\n");
return buffer.toString();
}
}
@@ -149,6 +176,19 @@
return (EjbMetaData<T>) super.get(key);
}
+ @Override
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("EJB metadata: " + delegate.size() + "\n");
+ int i = 0;
+ for (Entry<Class<?>, EjbMetaData<?>> entry : delegate.entrySet())
+ {
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString() + "\n");
+ }
+ return buffer.toString();
+ }
+
}
private Map<Class<? extends Annotation>, StereotypeModel<?>> stereotypes = new HashMap<Class<? extends Annotation>, StereotypeModel<?>>();
@@ -189,13 +229,14 @@
{
StringBuffer buffer = new StringBuffer();
buffer.append("Metadata cache\n");
- buffer.append(bindingTypes.toString());
- buffer.append(ejbMetaDataMap.toString());
- buffer.append(scopes.toString());
- buffer.append("Stereotypes:\n");
+ buffer.append(bindingTypes.toString() + "\n");
+ buffer.append(ejbMetaDataMap.toString() + "\n");
+ buffer.append(scopes.toString() + "\n");
+ buffer.append("Stereotypes: " + stereotypes.size() + "\n");
+ int i = 0;
for (Entry<Class<? extends Annotation>, StereotypeModel<?>> entry : stereotypes.entrySet())
{
- buffer.append(entry.getKey().getName() + ": " + entry.getValue().toString() + "\n");
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString() + "\n");
}
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -27,6 +27,7 @@
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
+import java.util.Map.Entry;
import javax.webbeans.NullableDependencyException;
import javax.webbeans.manager.Bean;
@@ -77,6 +78,15 @@
return delegate().hashCode();
}
+ @Override
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Resolvable annotation item\n");
+ buffer.append(delegate().toString() + "\n");
+ return buffer.toString();
+ }
+
}
// TODO Why can't we generify Set?
@@ -105,6 +115,15 @@
{
return delegate;
}
+
+ @Override
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Annotated item\n");
+ buffer.append(delegate().toString() + "\n");
+ return buffer.toString();
+ }
}
@@ -324,11 +343,25 @@
// TODO Auto-generated method stub
return null;
}
-
+
@Override
- public String toString() {
+ public String toString()
+ {
StringBuffer buffer = new StringBuffer();
- buffer.append("FIX ME!\n");
+ buffer.append("Resolver\n");
+ buffer.append(resolvedInjectionPoints.toString() + "\n");
+ buffer.append("Injection points: " + injectionPoints.size() + "\n");
+ int i = 0;
+ for (AnnotatedItem<?, ?> injectionPoint : injectionPoints)
+ {
+ buffer.append(++i + " - " + injectionPoint.toString() + "\n");
+ }
+ buffer.append("Resolved names: " + resolvedNames.size() + "\n");
+ i = 0;
+ for (Entry<String, Set<Bean<?>>> entry : resolvedNames.entrySet())
+ {
+ buffer.append(++i + " - " + entry + ": " + entry.getValue().toString() + "\n");
+ }
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -268,13 +268,13 @@
int i = 0;
for (AnnotatedMethod<?> initializerMethod : initializerMethods)
{
- buffer.append(++i + " - " + initializerMethod.toString());
+ buffer.append(++i + " - " + initializerMethod.toString() + "\n");
}
i = 0;
- buffer.append("Injectable fields " + injectableFields.size());
+ buffer.append("Injectable fields " + injectableFields.size() + "\n");
for (AnnotatedField<?> injectableField : injectableFields)
{
- buffer.append(++i + " - " + injectableField.toString());
+ buffer.append(++i + " - " + injectableField.toString() + "\n");
}
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/MergedStereotypes.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/MergedStereotypes.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/MergedStereotypes.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -154,30 +154,30 @@
{
StringBuffer buffer = new StringBuffer();
buffer.append("Merged stereotype\n");
- buffer.append("Bean name defaulted: " + beanNameDefaulted);
- buffer.append("Possible deployment types: " + possibleDeploymentTypes.size());
+ buffer.append("Bean name defaulted: " + beanNameDefaulted + "\n");
+ buffer.append("Possible deployment types: " + possibleDeploymentTypes.size() + "\n");
int i = 0;
for (Entry<Class<? extends Annotation>, Annotation> entry : possibleDeploymentTypes.entrySet())
{
- buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString());
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + entry.getValue().toString() + "\n");
}
- buffer.append("Possible scope types: " + possibleScopeTypes.size());
+ buffer.append("Possible scope types: " + possibleScopeTypes.size() + "\n");
i = 0;
for (Annotation scopeType : possibleScopeTypes)
{
buffer.append(++i + " - " + scopeType.toString());
}
- buffer.append("Required types: " + requiredTypes.size());
+ buffer.append("Required types: " + requiredTypes.size() + "\n");
i = 0;
for (Class<?> requiredType : requiredTypes)
{
- buffer.append(++i + " - " + requiredType.getName());
+ buffer.append(++i + " - " + requiredType.getName() + "\n");
}
- buffer.append("Supported scopes: " + supportedScopes.size());
+ buffer.append("Supported scopes: " + supportedScopes.size() + "\n");
i = 0;
for (Class<?> supportedScope : supportedScopes)
{
- buffer.append(++i + " - " + supportedScope.getName());
+ buffer.append(++i + " - " + supportedScope.getName() + "\n");
}
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlEnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlEnterpriseBean.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlEnterpriseBean.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -53,7 +53,7 @@
{
StringBuffer buffer = new StringBuffer();
buffer.append("XML-defined enterprise bean\n");
- buffer.append(super.toString());
+ buffer.append(super.toString() + "\n");
return buffer.toString();
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlSimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlSimpleBean.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/XmlSimpleBean.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -53,7 +53,7 @@
{
StringBuffer buffer = new StringBuffer();
buffer.append("XML-defined simple bean\n");
- buffer.append(super.toString());
+ buffer.append(super.toString() + "\n");
return buffer.toString();
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -87,7 +87,7 @@
{
StringBuffer buffer = new StringBuffer();
buffer.append("Proxy method handler\n");
- buffer.append("Bean " + (bean == null ? "null" : bean.toString()));
+ buffer.append("Bean " + (bean == null ? "null" : bean.toString()) + "\n");
buffer.append("Bean index: " + beanIndex + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -78,7 +78,7 @@
int i = 0;
for (Entry<Bean<?>, Object> entry : delegate.entrySet())
{
- buffer.append(i + " - " + entry.getKey().toString() + ": " + entry.getValue().toString());
+ buffer.append(i + " - " + entry.getKey().toString() + ": " + entry.getValue().toString() + "\n");
}
return buffer.toString();
}
@@ -203,7 +203,8 @@
public String toString()
{
StringBuffer buffer = new StringBuffer();
- buffer.append("Proxy pool: " + pool.toString() + "\n");
+ buffer.append("Proxy pool\n");
+ buffer.append(pool.toString() + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -81,12 +81,14 @@
public String toString()
{
StringBuffer buffer = new StringBuffer();
+ buffer.append("Context map\n");
buffer.append("Known scope types: " + delegate.size() + "\n");
+ int i = 0;
for (Entry<Class<? extends Annotation>, List<Context>> entry : delegate.entrySet())
{
for (Context context : entry.getValue())
{
- buffer.append(context.toString() + "\n");
+ buffer.append(++i + " - " + entry.getKey().getName() + ": " + context.toString() + "\n");
}
}
return buffer.toString();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/SessionBeanMap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/SessionBeanMap.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/SessionBeanMap.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -202,7 +202,7 @@
{
StringBuffer buffer = new StringBuffer();
List<Bean<?>> beans = (List) keySet();
- buffer.append(beans.size() + " found in session");
+ buffer.append(beans.size() + " found in session\n");
for (Bean<?> bean : beans)
{
Object instance = get(bean);
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -163,19 +163,19 @@
int i = 0;
for (AnnotatedMethod<?> method : destructorMethods)
{
- buffer.append(++i + " - " + method.toString());
+ buffer.append(++i + " - " + method.toString() + "\n");
}
i = 0;
buffer.append("Remove methods: " + removeMethods.size() + "\n");
for (AnnotatedMethod<?> method : removeMethods)
{
- buffer.append(++i + " - " + method.toString());
+ buffer.append(++i + " - " + method.toString() + "\n");
}
i = 0;
buffer.append("No-args remove methods: " + noArgsRemoveMethods.size() + "\n");
for (AnnotatedMethod<?> method : noArgsRemoveMethods)
{
- buffer.append(++i + " - " + method.toString());
+ buffer.append(++i + " - " + method.toString() + "\n");
}
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java 2008-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -184,21 +184,22 @@
}
}
-
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
buffer.append("Event manager\n");
buffer.append("Registered observers: " + registeredObservers.size() + "\n");
+ int i = 1;
for (Entry<Class<?>, CopyOnWriteArrayList<EventObserver<?>>> entry : registeredObservers.entrySet())
{
- buffer.append(entry.getKey().getName() + ":\n");
for (EventObserver<?> observer : entry.getValue())
{
- buffer.append(" " + observer.toString());
+ buffer.append(i + " - " + entry.getKey().getName() + ": " + observer.toString() + "\n");
}
+ i++;
}
+ buffer.append("Transaction manager: " + transactionManager + "\n");
return buffer.toString();
}
}
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-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/BindingTypeModel.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -118,7 +118,7 @@
for (AnnotatedMethod<?> method : nonBindingTypes) {
method.toString();
}
- buffer.append("Annotated type " + getAnnotatedAnnotation().getName());
+ buffer.append("Annotated type " + getAnnotatedAnnotation().getName() + "\n");
return buffer.toString();
}
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-11-21 10:16:45 UTC (rev 348)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ScopeModel.java 2008-11-21 11:00:56 UTC (rev 349)
@@ -58,7 +58,7 @@
StringBuffer buffer = new StringBuffer();
buffer.append("Scope model\n");
buffer.append("Valid : " + isValid() + "\n");
- buffer.append("Annotated type " + getAnnotatedAnnotation().toString());
+ buffer.append("Annotated type " + getAnnotatedAnnotation().toString() + "\n");
return buffer.toString();
}
More information about the weld-commits
mailing list