/** Returns the value of the field with the specified key or null if not available */ public static String get(TraceContext context, String name, Class<? extends PropagationFields> type) { if (context == null) throw new NullPointerException("context == null"); if (name == null) throw new NullPointerException("name == null"); PropagationFields fields = context.findExtra(type); return fields != null ? fields.get(name) : null; }
/** Returns the value of the field with the specified key or null if not available */ @Nullable public static String get(TraceContext context, String name) { return PropagationFields.get(context, lowercase(name), Extra.class); }
/** Returns the value of the field with the specified key or null if not available */ public static String get(TraceContext context, String name, Class<? extends PropagationFields> type) { if (context == null) throw new NullPointerException("context == null"); if (name == null) throw new NullPointerException("name == null"); PropagationFields fields = context.findExtra(type); return fields != null ? fields.get(name) : null; }
/** Returns the value of the field with the specified key or null if not available */ @Nullable public static String get(TraceContext context, String name) { return PropagationFields.get(context, lowercase(name), Extra.class); }