From: acolyer Date: Tue, 8 Jun 2004 14:10:06 +0000 (+0000) Subject: exposed additional factory methods for creating signatures X-Git-Tag: for_ajdt1_1_12~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e31d2ba53cecb7f38e9803d1cc6da735e36292fe;p=aspectj.git exposed additional factory methods for creating signatures (the create from string ones that already exist seem to be unused and are a little odd). --- diff --git a/runtime/src/org/aspectj/runtime/reflect/Factory.java b/runtime/src/org/aspectj/runtime/reflect/Factory.java index 44f03d686..1c2b2f2bb 100644 --- a/runtime/src/org/aspectj/runtime/reflect/Factory.java +++ b/runtime/src/org/aspectj/runtime/reflect/Factory.java @@ -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) {