org.mutabilitydetector.checkers
Class AbstractMutabilityChecker

java.lang.Object
  extended by org.objectweb.asm.ClassVisitor
      extended by org.mutabilitydetector.checkers.AsmMutabilityChecker
          extended by org.mutabilitydetector.checkers.AbstractMutabilityChecker
Direct Known Subclasses:
ArrayFieldMutabilityChecker, CanSubclassChecker, CollectionWithMutableElementTypeToFieldChecker, EscapedThisReferenceChecker, InherentTypeMutabilityChecker, MutableTypeToFieldChecker, NonFinalFieldChecker, NullMutabilityChecker, PrivateMethodInvocationChecker, PublishedNonFinalFieldChecker, SetterMethodChecker, TypeStructureInformationChecker

public abstract class AbstractMutabilityChecker
extends AsmMutabilityChecker


Field Summary
protected  String ownerClass
           
protected  Collection<MutableReasonDetail> reasons
           
 
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv
 
Constructor Summary
AbstractMutabilityChecker()
           
 
Method Summary
 CheckerResult checkerResult()
           
protected  MutableReasonDetail createResult(String message, CodeLocation<?> location, Reason reason)
           
 CodeLocation<?> getCodeLocationForException()
           
 Collection<MutableReasonDetail> reasons()
           
 IsImmutable result()
           
protected  void setResult(String message, CodeLocation<?> location, Reason reason)
           
 void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
           
 void visitAnalysisException(Throwable toBeThrown)
           
 org.objectweb.asm.AnnotationVisitor visitAnnotation(String desc, boolean visible)
           
 void visitAttribute(org.objectweb.asm.Attribute attr)
           
 void visitEnd()
           
 org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
           
 void visitInnerClass(String name, String outerName, String innerName, int access)
           
 org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
           
 void visitOuterClass(String owner, String name, String desc)
           
 void visitSource(String source, String debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reasons

protected Collection<MutableReasonDetail> reasons

ownerClass

protected String ownerClass
Constructor Detail

AbstractMutabilityChecker

public AbstractMutabilityChecker()
Method Detail

result

public IsImmutable result()
Specified by:
result in class AsmMutabilityChecker

reasons

public Collection<MutableReasonDetail> reasons()
Specified by:
reasons in class AsmMutabilityChecker

visit

public void visit(int version,
                  int access,
                  String name,
                  String signature,
                  String superName,
                  String[] interfaces)
Overrides:
visit in class org.objectweb.asm.ClassVisitor

visitAnnotation

public org.objectweb.asm.AnnotationVisitor visitAnnotation(String desc,
                                                           boolean visible)
Overrides:
visitAnnotation in class org.objectweb.asm.ClassVisitor

visitAttribute

public void visitAttribute(org.objectweb.asm.Attribute attr)
Overrides:
visitAttribute in class org.objectweb.asm.ClassVisitor

visitEnd

public void visitEnd()
Overrides:
visitEnd in class org.objectweb.asm.ClassVisitor

visitField

public org.objectweb.asm.FieldVisitor visitField(int access,
                                                 String name,
                                                 String desc,
                                                 String signature,
                                                 Object value)
Overrides:
visitField in class org.objectweb.asm.ClassVisitor

visitInnerClass

public void visitInnerClass(String name,
                            String outerName,
                            String innerName,
                            int access)
Overrides:
visitInnerClass in class org.objectweb.asm.ClassVisitor

visitMethod

public org.objectweb.asm.MethodVisitor visitMethod(int access,
                                                   String name,
                                                   String desc,
                                                   String signature,
                                                   String[] exceptions)
Overrides:
visitMethod in class org.objectweb.asm.ClassVisitor

visitOuterClass

public void visitOuterClass(String owner,
                            String name,
                            String desc)
Overrides:
visitOuterClass in class org.objectweb.asm.ClassVisitor

visitSource

public void visitSource(String source,
                        String debug)
Overrides:
visitSource in class org.objectweb.asm.ClassVisitor

visitAnalysisException

public final void visitAnalysisException(Throwable toBeThrown)
Specified by:
visitAnalysisException in class AsmMutabilityChecker

getCodeLocationForException

public CodeLocation<?> getCodeLocationForException()

createResult

protected MutableReasonDetail createResult(String message,
                                           CodeLocation<?> location,
                                           Reason reason)

setResult

protected void setResult(String message,
                         CodeLocation<?> location,
                         Reason reason)

checkerResult

public CheckerResult checkerResult()
Specified by:
checkerResult in class AsmMutabilityChecker


Copyright © 2013. All Rights Reserved.