Class SherlockHelper


  • public class SherlockHelper
    extends java.lang.Object
    Static helper functions and access to various engine functions which do not fit elsewhere in the api
    • Constructor Summary

      Constructors 
      Constructor Description
      SherlockHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String buildFieldReference​(java.lang.reflect.Field field)
      Builds the reference string of a field by prepending the declaring class name
      static ICodeBlockGroup getInstanceOfCodeBlockGroup()
      Constructs a new instance of the current ICodeBlockGroup implementation and returns it
      static ISourceFile getSourceFile​(long persistentId)
      Fetches the instance of ISourceFile for the corresponding unique id
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SherlockHelper

        public SherlockHelper()
    • Method Detail

      • buildFieldReference

        public static java.lang.String buildFieldReference​(java.lang.reflect.Field field)
        Builds the reference string of a field by prepending the declaring class name
        Parameters:
        field - field to build reference for
        Returns:
        string reference for field
      • getInstanceOfCodeBlockGroup

        public static ICodeBlockGroup getInstanceOfCodeBlockGroup()
                                                           throws java.lang.IllegalAccessException,
                                                                  java.lang.InstantiationException,
                                                                  java.lang.NoSuchMethodException,
                                                                  java.lang.reflect.InvocationTargetException
        Constructs a new instance of the current ICodeBlockGroup implementation and returns it
        Returns:
        New instance
        Throws:
        java.lang.IllegalAccessException - the implementation is incorrect
        java.lang.InstantiationException - issue creating new instance
        java.lang.NoSuchMethodException - the implementation is incorrect
        java.lang.reflect.InvocationTargetException - inuse code block group class is null, ensure SherlockEngine is running correctly
      • getSourceFile

        public static ISourceFile getSourceFile​(long persistentId)
        Fetches the instance of ISourceFile for the corresponding unique id
        Parameters:
        persistentId - unique id to fetch
        Returns:
        instance of ISourceFile with passed id