Class Location.NewLocation

  • Enclosing class:
    Location

    private static class Location.NewLocation
    extends Location
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int count
      count identifying which new operation should be taken as the trigger point.
      (package private) int dims
      number of array dimensions that should be matched at an array allocation site or 0 if plain, non-array object allocations should be matched
      private java.lang.String typeName
      the name of the new type being created or the empty String if no typename was specified
      private boolean whenComplete
      flag which is false if the trigger should be inserted before the method invocation is performed and true if it should be inserted after
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NewLocation​(java.lang.String typeName, int count, int dims, boolean whenComplete)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static Location create​(java.lang.String parameters, boolean whenComplete)
      create a location identifying a method exceptional exit trigger point
      LocationType getLocationType()
      identify the type of this location
      RuleTriggerAdapter getRuleAdapter​(org.objectweb.asm.ClassVisitor cv, TransformContext transformContext)
      return an adapter which can be used to insert a trigger call in a method containing a trigger point whose position matches this location
      RuleCheckAdapter getRuleCheckAdapter​(org.objectweb.asm.ClassVisitor cv, TransformContext transformContext)
      return an adapter which can be used to check whether a method contains a trigger point whose position matches this location
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • typeName

        private java.lang.String typeName
        the name of the new type being created or the empty String if no typename was specified
      • count

        private int count
        count identifying which new operation should be taken as the trigger point. if not specified as a parameter this defaults to the first invocation. if 'ALL' was specified this takes value 0.
      • dims

        int dims
        number of array dimensions that should be matched at an array allocation site or 0 if plain, non-array object allocations should be matched
      • whenComplete

        private boolean whenComplete
        flag which is false if the trigger should be inserted before the method invocation is performed and true if it should be inserted after
    • Constructor Detail

      • NewLocation

        private NewLocation​(java.lang.String typeName,
                            int count,
                            int dims,
                            boolean whenComplete)
    • Method Detail

      • create

        protected static Location create​(java.lang.String parameters,
                                         boolean whenComplete)
        create a location identifying a method exceptional exit trigger point
        Parameters:
        parameters - the text of the parameters appended to the location specifier
        Returns:
        a method entry location or null if the parameters is not a blank String
      • getRuleCheckAdapter

        public RuleCheckAdapter getRuleCheckAdapter​(org.objectweb.asm.ClassVisitor cv,
                                                    TransformContext transformContext)
        Description copied from class: Location
        return an adapter which can be used to check whether a method contains a trigger point whose position matches this location
        Specified by:
        getRuleCheckAdapter in class Location
        Parameters:
        cv - the current class visitor
        transformContext - the current transform context
        Returns:
        the required adapter
      • getRuleAdapter

        public RuleTriggerAdapter getRuleAdapter​(org.objectweb.asm.ClassVisitor cv,
                                                 TransformContext transformContext)
        Description copied from class: Location
        return an adapter which can be used to insert a trigger call in a method containing a trigger point whose position matches this location
        Specified by:
        getRuleAdapter in class Location
        Parameters:
        cv - the current class visitor
        transformContext - the current transform context
        Returns:
        the required adapter
      • getLocationType

        public LocationType getLocationType()
        Description copied from class: Location
        identify the type of this location
        Specified by:
        getLocationType in class Location
        Returns:
        the type of this location
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object