@SuppressWarnings({"unchecked", "rawtypes"}) public static <T> ExtensionList<T> create(Jenkins jenkins, Class<T> type) { if(type.getAnnotation(LegacyInstancesAreScopedToHudson.class)!=null) return new ExtensionList<T>(jenkins,type); else { return new ExtensionList(jenkins, type, staticLegacyInstances.computeIfAbsent(type, key -> new CopyOnWriteArrayList())); } }
public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type) { if(type.getAnnotation(LegacyInstancesAreScopedToHudson.class)!=null) return new ExtensionList<T>(hudson,type); else { return new ExtensionList<T>(hudson,type,staticLegacyInstances.get(type)); } }
public static <T> ExtensionList<T> create(Jenkins jenkins, Class<T> type) { if(type.getAnnotation(LegacyInstancesAreScopedToHudson.class)!=null) return new ExtensionList<T>(jenkins,type); else { return new ExtensionList<T>(jenkins,type,staticLegacyInstances.get(type)); } }
public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type) { if (type.getAnnotation(LegacyInstancesAreScopedToHudson.class) != null) { return new ExtensionList<T>(hudson, type); } else { return new ExtensionList<T>(hudson, type, staticLegacyInstances.get(type)); } } /**
public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type) { if(type.getAnnotation(LegacyInstancesAreScopedToHudson.class)!=null) return new ExtensionList<T>(hudson,type); else { return new ExtensionList<T>(hudson,type,staticLegacyInstances.get(type)); } }
public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type) { if(type.getAnnotation(LegacyInstancesAreScopedToHudson.class)!=null) return new ExtensionList<T>(hudson,type); else { return new ExtensionList<T>(hudson,type,staticLegacyInstances.get(type)); } }