1 package com.fasterxml.jackson.databind.util; 2 3 /** 4 * Enumeration used to indicate required access pattern for providers: 5 * this can sometimes be used to optimize out dynamic calls. 6 * The main difference is between constant values (which can be resolved once) 7 * and dynamic ones (which must be resolved anew every time). 8 */ 9 public enum AccessPattern { 10 /** 11 * Value that indicates that provider never returns anything other than 12 * Java `null`. 13 */ 14 ALWAYS_NULL, 15 16 /** 17 * Value that indicates that provider will always return a constant 18 * value, regardless of when it is called; and also that it never 19 * uses `context` argument (which may then be passed as `null`) 20 */ 21 CONSTANT, 22 23 /** 24 * Value that indicates that provider may return different values 25 * at different times (often a freshly constructed empty container), 26 * and thus must be called every time "null replacement" value is 27 * needed. 28 */ 29 DYNAMIC 30 ; 31 } 32