From e31d2ba53cecb7f38e9803d1cc6da735e36292fe Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 8 Jun 2004 14:10:06 +0000 Subject: [PATCH] exposed additional factory methods for creating signatures (the create from string ones that already exist seem to be unused and are a little odd). --- .../org/aspectj/runtime/reflect/Factory.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) 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) { -- 2.39.5