]> source.dussan.org Git - aspectj.git/commitdiff
exposed additional factory methods for creating signatures
authoracolyer <acolyer>
Tue, 8 Jun 2004 14:10:06 +0000 (14:10 +0000)
committeracolyer <acolyer>
Tue, 8 Jun 2004 14:10:06 +0000 (14:10 +0000)
(the create from string ones that already exist seem to be unused
and are a little odd).

runtime/src/org/aspectj/runtime/reflect/Factory.java

index 44f03d6862205851b9aa2de19cb531f757061d30..1c2b2f2bb571848b3169547841b14c3c4cac8f39 100644 (file)
@@ -71,18 +71,40 @@ public final class Factory {
         ret.setLookupClassLoader(lookupClassLoader);
         return ret;
     }
+    
+    public MethodSignature makeMethodSig(int modifiers, String name, Class declaringType, 
+            Class[] parameterTypes, String[] parameterNames, Class[] exceptionTypes,
+               Class returnType) {
+        MethodSignatureImpl ret = new MethodSignatureImpl(modifiers,name,declaringType,parameterTypes,parameterNames,exceptionTypes,returnType);
+        ret.setLookupClassLoader(lookupClassLoader);
+        return ret;   
+    }
 
     public ConstructorSignature makeConstructorSig(String stringRep) {
         ConstructorSignatureImpl ret = new ConstructorSignatureImpl(stringRep);
         ret.setLookupClassLoader(lookupClassLoader);
         return ret;
     }
+    
+    public ConstructorSignature makeConstructorSig(int modifiers, Class declaringType, 
+            Class[] parameterTypes, String[] parameterNames, Class[] exceptionTypes) {
+        ConstructorSignatureImpl ret = new ConstructorSignatureImpl(modifiers,declaringType,parameterTypes,parameterNames,exceptionTypes);
+        ret.setLookupClassLoader(lookupClassLoader);
+        return ret;    
+    }
 
     public FieldSignature makeFieldSig(String stringRep) {
         FieldSignatureImpl ret = new FieldSignatureImpl(stringRep);
         ret.setLookupClassLoader(lookupClassLoader);
         return ret;
     }
+    
+    public FieldSignature makeFieldSig(int modifiers, String name, Class declaringType, 
+            Class fieldType) {
+        FieldSignatureImpl ret = new FieldSignatureImpl(modifiers,name,declaringType,fieldType);
+        ret.setLookupClassLoader(lookupClassLoader);
+        return ret;            
+    }
 
     public AdviceSignature makeAdviceSig(String stringRep) {
         AdviceSignatureImpl ret = new AdviceSignatureImpl(stringRep);
@@ -90,18 +112,39 @@ public final class Factory {
         return ret;
     }
 
+    public AdviceSignature makeAdviceSig(int modifiers, String name, Class declaringType, 
+            Class[] parameterTypes, String[] parameterNames, Class[] exceptionTypes,
+               Class returnType) {
+        AdviceSignatureImpl ret = new AdviceSignatureImpl(modifiers,name,declaringType,parameterTypes,parameterNames,exceptionTypes,returnType);
+        ret.setLookupClassLoader(lookupClassLoader);
+        return ret;
+    }
+
     public InitializerSignature makeInitializerSig(String stringRep) {
         InitializerSignatureImpl ret = new InitializerSignatureImpl(stringRep);
         ret.setLookupClassLoader(lookupClassLoader);
         return ret;
     }
 
+    public InitializerSignature makeInitializerSig(int modifiers, Class declaringType) {
+        InitializerSignatureImpl ret = new InitializerSignatureImpl(modifiers,declaringType);
+        ret.setLookupClassLoader(lookupClassLoader);
+        return ret;
+    }
+    
     public CatchClauseSignature makeCatchClauseSig(String stringRep) {
         CatchClauseSignatureImpl ret = new CatchClauseSignatureImpl(stringRep);
         ret.setLookupClassLoader(lookupClassLoader);
         return ret;
     }
     
+    public CatchClauseSignature makeCatchClauseSig(Class declaringType, 
+            Class parameterType, String parameterName) {
+        CatchClauseSignatureImpl ret = new CatchClauseSignatureImpl(declaringType,parameterType,parameterName);
+        ret.setLookupClassLoader(lookupClassLoader);
+        return ret;            
+    }
+    
 
     public SourceLocation makeSourceLoc(int line, int col)
     {