it.imolinfo.jbi4corba.webservice.generator.bcm
Class SerializableInspectorAdapter

java.lang.Object
  extended by org.objectweb.asm.ClassAdapter
      extended by it.imolinfo.jbi4corba.webservice.generator.bcm.SerializableInspectorAdapter
All Implemented Interfaces:
org.objectweb.asm.ClassVisitor
Direct Known Subclasses:
SerializableDecorationAdapter

public class SerializableInspectorAdapter
extends org.objectweb.asm.ClassAdapter

This adapter inspect a class to find Serializable interface and serial version UID.


Field Summary
protected  ClassMetaInfo classMetaInfo
          The meta information of the class inspected.
static String FIELDNAME_SERIAL_VERSION_UID
          The field 'serialVersionUID'.
static String INTERNAL_NAME_OF_SERIALIZABLE
          The internal name of the java interface 'Serializable'.
 
Fields inherited from class org.objectweb.asm.ClassAdapter
cv
 
Constructor Summary
SerializableInspectorAdapter(org.objectweb.asm.ClassVisitor cv)
          Constructor.
 
Method Summary
 ClassMetaInfo getClassMetaInfo()
           
protected  boolean hasSerialVersionUIDField(String name, String desc)
          Utility.
protected  boolean implementsSerializable(String[] interfaces)
           
 void setClassMetaInfo(ClassMetaInfo classMetaInfo)
           
 void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
          Override.
 org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
          Override.
 
Methods inherited from class org.objectweb.asm.ClassAdapter
visitAnnotation, visitAttribute, visitEnd, visitInnerClass, visitMethod, visitOuterClass, visitSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERNAL_NAME_OF_SERIALIZABLE

public static final String INTERNAL_NAME_OF_SERIALIZABLE
The internal name of the java interface 'Serializable'.

See Also:
Constant Field Values

FIELDNAME_SERIAL_VERSION_UID

public static final String FIELDNAME_SERIAL_VERSION_UID
The field 'serialVersionUID'.

See Also:
Constant Field Values

classMetaInfo

protected ClassMetaInfo classMetaInfo
The meta information of the class inspected.

Constructor Detail

SerializableInspectorAdapter

public SerializableInspectorAdapter(org.objectweb.asm.ClassVisitor cv)
Constructor.

Parameters:
cv - The class visitor instance.
Method Detail

visit

public void visit(int version,
                  int access,
                  String name,
                  String signature,
                  String superName,
                  String[] interfaces)
Override.

Specified by:
visit in interface org.objectweb.asm.ClassVisitor
Overrides:
visit in class org.objectweb.asm.ClassAdapter
Parameters:
version - The version
access - The access
name - The name
signature - The signature
superName - The superName
interfaces - The interfaces

visitField

public org.objectweb.asm.FieldVisitor visitField(int access,
                                                 String name,
                                                 String desc,
                                                 String signature,
                                                 Object value)
Override.

Specified by:
visitField in interface org.objectweb.asm.ClassVisitor
Overrides:
visitField in class org.objectweb.asm.ClassAdapter
Parameters:
access - The access
name - The name
desc - The description
signature - The signature
value - The value
Returns:
The return

hasSerialVersionUIDField

protected boolean hasSerialVersionUIDField(String name,
                                           String desc)
Utility.

Parameters:
name - The name
desc - The description
Returns:
The return

implementsSerializable

protected boolean implementsSerializable(String[] interfaces)
Parameters:
interfaces - The interfaces
Returns:
The return

getClassMetaInfo

public ClassMetaInfo getClassMetaInfo()
Returns:
The return

setClassMetaInfo

public void setClassMetaInfo(ClassMetaInfo classMetaInfo)
Parameters:
classMetaInfo - The class meta info


Copyright © 2005-2010 Imola Informatica. All Rights Reserved.