added:11 methods
authorcg
Fri, 09 Oct 2009 14:21:53 +0000
changeset 745 bc70bed321af
parent 744 8cbe20f2a6f4
child 746 cc5f1445bce9
added:11 methods changed: #readAttribute:for:
JavaClassReader.st
--- a/JavaClassReader.st	Fri Oct 09 14:04:34 2009 +0000
+++ b/JavaClassReader.st	Fri Oct 09 14:21:53 2009 +0000
@@ -847,7 +847,105 @@
 
 !JavaClassReader methodsFor:'file reading - attributes'!
 
+readAnnotationDefaultAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: AnnotationDefault') infoPrintCR.
+        self skipAttribute:'AnnotationDefault'.
+!
+
 readAttribute:attributeName for:something
+    "/ implemented JAVA attributes
+    (attributeName = 'ConstantValue') ifTrue:[
+        self readConstantValueAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'Code') ifTrue:[
+        self readCodeAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'Exceptions') ifTrue:[
+        self readExceptionsAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'InnerClasses') ifTrue:[
+        self readInnerClassesAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'EnclosingMethod') ifTrue:[
+        self readEnclosingMethodAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'LineNumberTable') ifTrue:[
+        self readLineNumberTableAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'LocalVariableTable') ifTrue:[
+        self readLocalVariableTableAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'LocalVariableTypeTable') ifTrue:[
+        self readLocalVariableTypeTableAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'SourceFile') ifTrue:[
+        self readSourceFileAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'SourceDebugExtension') ifTrue:[
+        self readSourceDebugExtensionAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'Synthetic') ifTrue:[
+        self readSyntheticAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'Signature') ifTrue:[
+        self readSignatureAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'Deprecated') ifTrue:[
+        self readDeprecatedAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'RuntimeVisibleAnnotations') ifTrue:[
+        self readRuntimeVisibleAnnotationsAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'RuntimeInvisibleAnnotations') ifTrue:[
+        self readRuntimeInvisibleAnnotationsAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'RuntimeVisibleParameterAnnotations') ifTrue:[
+        self readRuntimeVisibleParameterAnnotationsAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'RuntimeInvisibleParameterAnnotations') ifTrue:[
+        self readRuntimeInvisibleParameterAnnotationsAttributeFor:something.
+        ^ self.
+    ].
+    (attributeName = 'AnnotationDefault') ifTrue:[
+        self readAnnotationDefaultAttributeFor:something.
+        ^ self.
+    ].
+
+    "/ ignored JAVA attributes
+    (attributeName = 'FastJavac1.0') ifTrue:[
+"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
+        self skipAttribute:attributeName.
+        ^ self.
+    ].
+    (attributeName = 'AbsoluteSourcePath') ifTrue:[
+        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
+        self skipAttribute:attributeName.
+        ^ self.
+    ].
+
+    (attributeName startsWith:((Character value:13) asString , 'WARNING:')) ifTrue:[
+"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
+        self skipAttribute:attributeName.
+        ^ self.
+    ].
+
+
     "/ implemented ST attributes
     (attributeName = 'STLiterals') ifTrue:[
         self readSTLiteralsAttributeFor:something.
@@ -886,65 +984,6 @@
         ^ self.
     ].
 
-    "/ implemented JAVA attributes
-    (attributeName = 'Code') ifTrue:[
-        self readCodeAttributeFor:something.
-        ^ self.
-    ].
-    (attributeName = 'Exceptions') ifTrue:[
-        self readExceptionsAttributeFor:something.
-        ^ self.
-    ].
-    (attributeName = 'LineNumberTable') ifTrue:[
-        self readLineNumberTableAttributeFor:something.
-        ^ self.
-    ].
-    (attributeName = 'LocalVariableTable') ifTrue:[
-        self readLocalVariableTableAttributeFor:something.
-        ^ self.
-    ].
-    (attributeName = 'ConstantValue') ifTrue:[
-        self readConstantValueAttributeFor:something.
-        ^ self.
-    ].
-    (attributeName = 'SourceFile') ifTrue:[
-        self readSourceFileAttributeFor:something.
-        ^ self.
-    ].
-
-    "/ ignored JAVA attributes
-    (attributeName = 'Deprecated') ifTrue:[
-"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
-        self skipAttribute:attributeName.
-        ^ self.
-    ].
-    (attributeName = 'FastJavac1.0') ifTrue:[
-"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
-        self skipAttribute:attributeName.
-        ^ self.
-    ].
-    (attributeName = 'AbsoluteSourcePath') ifTrue:[
-        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
-        self skipAttribute:attributeName.
-        ^ self.
-    ].
-    (attributeName = 'Synthetic') ifTrue:[
-"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
-        self skipAttribute:attributeName.
-        ^ self.
-    ].
-    (attributeName = 'InnerClasses') ifTrue:[
-"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
-        self skipAttribute:attributeName.
-        ^ self.
-    ].
-
-    (attributeName startsWith:((Character value:13) asString , 'WARNING:')) ifTrue:[
-"/        ('JAVA [info]: unhandled attribute: ' , attributeName) infoPrintCR.
-        self skipAttribute:attributeName.
-        ^ self.
-    ].
-
     "/ unknown attributes
     ('JAVA [warning]: unrecognized attribute: ' , attributeName) infoPrintCR.
     self skipAttribute:attributeName.
@@ -1000,6 +1039,51 @@
     "Created: 15.4.1996 / 15:40:17 / cg"
 !
 
+readEnclosingMethodAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: EnclosingMethod') infoPrintCR.
+        self skipAttribute:'EnclosingMethod'.
+!
+
+readInnerClassesAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: InnerClasses') infoPrintCR.
+        self skipAttribute:'InnerClasses'.
+!
+
+readLocalVariableTypeTableAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: LocalVariableTypeTable') infoPrintCR.
+        self skipAttribute:'LocalVariableTypeTable'.
+!
+
+readRuntimeInvisibleAnnotationsAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: RuntimeInvisibleAnnotationsAttributeFor') infoPrintCR.
+        self skipAttribute:'RuntimeInvisibleAnnotationsAttributeFor'.
+!
+
+readRuntimeInvisibleParameterAnnotationsAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: RuntimeInvisibleParameterAnnotations') infoPrintCR.
+        self skipAttribute:'RuntimeInvisibleParameterAnnotations'.
+!
+
+readRuntimeVisibleAnnotationsAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: RuntimeVisibleAnnotations') infoPrintCR.
+        self skipAttribute:'RuntimeVisibleAnnotations'.
+!
+
+readRuntimeVisibleParameterAnnotationsAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: RuntimeVisibleParameterAnnotations') infoPrintCR.
+        self skipAttribute:'RuntimeVisibleParameterAnnotations'.
+!
+
+readSignatureAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: Signature') infoPrintCR.
+        self skipAttribute:'Signature'.
+!
+
+readSourceDebugExtensionAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: SourceDebugExtension') infoPrintCR.
+        self skipAttribute:'SourceDebugExtension'.
+!
+
 readSourceFileAttributeFor:aClass
     |attribute_length sourceFile_index sourceFile|
 
@@ -1027,6 +1111,11 @@
     "Modified: / 12.5.1998 / 22:01:07 / cg"
 !
 
+readSyntheticAttributeFor:something
+"/        ('JAVA [info]: unhandled attribute: Synthetic') infoPrintCR.
+        self skipAttribute:'Synthetic'.
+!
+
 skipAttribute:attributeName
     "dont know about this attribute - skip it here"
 
@@ -2199,7 +2288,11 @@
 !JavaClassReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClassReader.st,v 1.91 2009/08/24 19:32:39 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClassReader.st,v 1.92 2009/10/09 14:21:53 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClassReader.st,v 1.92 2009/10/09 14:21:53 cg Exp $'
 ! !
 
 JavaClassReader initialize!