CurrentMessageInjectorInterceptorFactorypublic class CurrentMessageInjectorInterceptorFactory extends Object implements org.jboss.aop.advice.AspectFactory
Methods Summary |
---|
public java.lang.Object | createPerClass(org.jboss.aop.Advisor advisor)
Class clazz = advisor.getClazz();
ArrayList<Field> fs = new ArrayList<Field>();
ArrayList<Method> ms = new ArrayList<Method>();
search(advisor,clazz, fs, ms);
Method[] methods = ms.toArray(new Method[ms.size()]);
Field[] fields = fs.toArray(new Field[fs.size()]);
if (methods.length == 0) methods = null;
if (fields.length == 0) fields = null;
return new CurrentMessageInjectorInterceptor(fields, methods);
| public java.lang.Object | createPerInstance(org.jboss.aop.Advisor advisor, org.jboss.aop.InstanceAdvisor instanceAdvisor)
throw new IllegalArgumentException("NOT LEGAL");
| public java.lang.Object | createPerJoinpoint(org.jboss.aop.Advisor advisor, org.jboss.aop.joinpoint.Joinpoint jp)
throw new IllegalArgumentException("NOT LEGAL");
| public java.lang.Object | createPerJoinpoint(org.jboss.aop.Advisor advisor, org.jboss.aop.InstanceAdvisor instanceAdvisor, org.jboss.aop.joinpoint.Joinpoint jp)
throw new IllegalArgumentException("NOT LEGAL");
| public java.lang.Object | createPerVM()
return null;
| public java.lang.String | getName()
return CurrentMessageInjectorInterceptor.class.getName();
| protected void | search(org.jboss.aop.Advisor advisor, java.lang.Class clazz, java.util.ArrayList fs, java.util.ArrayList ms)
Method[] methods = clazz.getDeclaredMethods();
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields)
{
if (advisor.resolveAnnotation(field, CurrentMessage.class) != null)
fs.add(field);
}
for (Method method : methods)
{
if (advisor.resolveAnnotation(method, CurrentMessage.class) != null)
ms.add(method);
}
if (clazz.getSuperclass() != null && !clazz.getSuperclass().equals(Object.class))
{
search(advisor, clazz.getSuperclass(), fs, ms);
}
|
|