From: <lk...@us...> - 2006-04-22 19:52:30
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/asm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10325/src/java/net/sf/clirr/core/internal/asm Modified Files: Repository.java Added Files: PrimitiveType.java Log Message: promoted Repository$PrimitiveType to a toplevel class --- NEW FILE --- package net.sf.clirr.core.internal.asm; import net.sf.clirr.core.spi.Field; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.Method; import net.sf.clirr.core.spi.Scope; class PrimitiveType implements JavaType { private final String basicName; PrimitiveType(String name) { this.basicName = name; } public String getBasicName() { return basicName; } public String getName() { return basicName; } public JavaType getContainingClass() { return null; } public JavaType[] getSuperClasses() { return new JavaType[0]; } public JavaType[] getAllInterfaces() { return new JavaType[0]; } public JavaType[] getInnerClasses() { return new JavaType[0]; } public Method[] getMethods() { return new Method[0]; } public Field[] getFields() { return new Field[0]; } public int getArrayDimension() { return 0; } public boolean isPrimitive() { return true; } public boolean isFinal() { return true; } public boolean isAbstract() { return false; } public boolean isInterface() { return false; } public Scope getDeclaredScope() { return Scope.PUBLIC; } public Scope getEffectiveScope() { return Scope.PUBLIC; } public String toString() { return getName(); } } Index: Repository.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/asm/Repository.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Repository.java 22 Apr 2006 19:13:14 -0000 1.3 +++ Repository.java 22 Apr 2006 19:52:25 -0000 1.4 @@ -9,10 +9,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.sf.clirr.core.spi.Field; import net.sf.clirr.core.spi.JavaType; -import net.sf.clirr.core.spi.Method; -import net.sf.clirr.core.spi.Scope; import org.objectweb.asm.ClassReader; @@ -26,97 +23,6 @@ private static final Pattern PRIMITIVE_PATTERN = Pattern.compile("(int|float|long|double|boolean|char|short|byte)"); private static final Pattern ARRAY_PATTERN = Pattern.compile("(\\[\\])+$"); - private static final class PrimitiveType implements JavaType - { - private final String basicName; - - private PrimitiveType(String name) - { - this.basicName = name; - } - - public String getBasicName() - { - return basicName; - } - - public String getName() - { - return basicName; - } - - public JavaType getContainingClass() - { - return null; - } - - public JavaType[] getSuperClasses() - { - return new JavaType[0]; - } - - public JavaType[] getAllInterfaces() - { - return new JavaType[0]; - } - - public JavaType[] getInnerClasses() - { - return new JavaType[0]; - } - - public Method[] getMethods() - { - return new Method[0]; - } - - public Field[] getFields() - { - return new Field[0]; - } - - public int getArrayDimension() - { - return 0; - } - - public boolean isPrimitive() - { - return true; - } - - public boolean isFinal() - { - return true; - } - - public boolean isAbstract() - { - return false; - } - - public boolean isInterface() - { - return false; - } - - public Scope getDeclaredScope() - { - return Scope.PUBLIC; - } - - public Scope getEffectiveScope() - { - // TODO Auto-generated method stub - return null; - } - - public String toString() - { - return getName(); - } - } - private final ClassLoader classLoader; private Map nameTypeMap = new HashMap(); |