3 Replies Latest reply on Apr 8, 2015 3:55 AM by Andrew Dinn

    How to access a static field in a class?

    Wang Shuai Newbie

      Dear all,

       

           We are using Byteman for fault Injection, we are trying to access a static field in a class. I have read the Programmer Guid. But I have not find the answer. Please consider the following situation :

       

       

      public class DynamicPropertiesSpringConfigurer extends

        PropertyPlaceholderConfigurer {

        private static final Logger logger = Logger.getLogger(DynamicPropertiesSpringConfigurer.class);

        private String[] propertiesKeys;


      ...

       

      }

       

      We can use $0.propertiesKeys to access an instance field propertiesKeys. But how can I access logger and invoke logger's methods?

       

      Thank you!