/** * <p>Push the specified {@link UIComponentTag} instance onto our component * tag stack, creating a stack if necessary.</p> */ private void pushUIComponentClassicTagBase() { Map<String,Object> requestMap = context.getExternalContext().getRequestMap(); List<UIComponentClassicTagBase> list = TypedCollections.dynamicallyCastList((List) requestMap.get(COMPONENT_TAG_STACK_ATTR), UIComponentClassicTagBase.class); if (list == null) { //noinspection CollectionWithoutInitialCapacity list = new ArrayList<UIComponentClassicTagBase>(); requestMap.put(COMPONENT_TAG_STACK_ATTR, list); } list.add(this); }
return null; assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName();
/** * Dynamically check that the members of the list are all instances of * the given type (or null). * * @param <E> * the list's element type * @param list * the list to cast * @param type * the class of the list's element type. * @return the dynamically-type checked list. * @throws java.lang.ClassCastException */ @SuppressWarnings("unchecked") static <E> List<E> dynamicallyCastList(List<?> list, Class<E> type) { return dynamicallyCastCollection(list, type, List.class); }
Set<String> previousJspIdSet = TypedCollections.dynamicallyCastSet((Set) pageContext.getAttribute(PREVIOUS_JSP_ID_SET, PageContext.PAGE_SCOPE), String.class);
requestMap.put(GLOBAL_ID_VIEW, componentIds); } else { componentIds = TypedCollections.dynamicallyCastMap((Map) requestMap.get(GLOBAL_ID_VIEW), String.class, UIComponentTagBase.class);
Set<String> previousJspIdSet; if (null == (previousJspIdSet = TypedCollections.dynamicallyCastSet((Set) pageContext.getAttribute(PREVIOUS_JSP_ID_SET, PageContext.PAGE_SCOPE), String.class))) {
/** * <p>Push the specified {@link UIComponentTag} instance onto our component * tag stack, creating a stack if necessary.</p> */ private void pushUIComponentClassicTagBase() { List<UIComponentClassicTagBase> list = TypedCollections.dynamicallyCastList((List) context.getAttributes().get(COMPONENT_TAG_STACK_ATTR), UIComponentClassicTagBase.class); if (list == null) { //noinspection CollectionWithoutInitialCapacity list = new ArrayList<>(); context.getAttributes().put(COMPONENT_TAG_STACK_ATTR, list); } list.add(this); }
/** * Dynamically check that the members of the set are all instances of * the given type (or null). * * @param <E> * the set's element type * @param set * the set to cast * @param type * the class of the set's element type. * @return the dynamically-type checked set. * @throws java.lang.ClassCastException */ @SuppressWarnings("unchecked") static <E> Set<E> dynamicallyCastSet(Set<?> set, Class<E> type) { return dynamicallyCastCollection(set, type, Set.class); }
return null; assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName();
Set<String> previousJspIdSet = TypedCollections.dynamicallyCastSet((Set) pageContext.getAttribute(PREVIOUS_JSP_ID_SET, PageContext.PAGE_SCOPE), String.class);
/** * <p>Push the specified {@link UIComponentTag} instance onto our component * tag stack, creating a stack if necessary.</p> */ private void pushUIComponentClassicTagBase() { List<UIComponentClassicTagBase> list = TypedCollections.dynamicallyCastList((List) context.getAttributes().get(COMPONENT_TAG_STACK_ATTR), UIComponentClassicTagBase.class); if (list == null) { //noinspection CollectionWithoutInitialCapacity list = new ArrayList<UIComponentClassicTagBase>(); context.getAttributes().put(COMPONENT_TAG_STACK_ATTR, list); } list.add(this); }
/** * Dynamically check that the members of the list are all instances of * the given type (or null). * * @param <E> * the list's element type * @param list * the list to cast * @param type * the class of the list's element type. * @return the dynamically-type checked list. * @throws java.lang.ClassCastException */ @SuppressWarnings("unchecked") static <E> List<E> dynamicallyCastList(List<?> list, Class<E> type) { return dynamicallyCastCollection(list, type, List.class); }
return null; assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName();
Set<String> previousJspIdSet = TypedCollections.dynamicallyCastSet((Set) pageContext.getAttribute(PREVIOUS_JSP_ID_SET, PageContext.PAGE_SCOPE), String.class);
/** * <p>Push the specified {@link UIComponentTag} instance onto our component * tag stack, creating a stack if necessary.</p> */ private void pushUIComponentClassicTagBase() { List<UIComponentClassicTagBase> list = TypedCollections.dynamicallyCastList((List) context.getAttributes().get(COMPONENT_TAG_STACK_ATTR), UIComponentClassicTagBase.class); if (list == null) { //noinspection CollectionWithoutInitialCapacity list = new ArrayList<>(); context.getAttributes().put(COMPONENT_TAG_STACK_ATTR, list); } list.add(this); }
/** * Dynamically check that the members of the set are all instances of * the given type (or null). * * @param <E> * the set's element type * @param set * the set to cast * @param type * the class of the set's element type. * @return the dynamically-type checked set. * @throws java.lang.ClassCastException */ @SuppressWarnings("unchecked") static <E> Set<E> dynamicallyCastSet(Set<?> set, Class<E> type) { return dynamicallyCastCollection(set, type, Set.class); }
return null; assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName();
Set<String> previousJspIdSet = TypedCollections.dynamicallyCastSet((Set) pageContext.getAttribute(PREVIOUS_JSP_ID_SET, PageContext.PAGE_SCOPE), String.class);
/** * <p>Push the specified {@link UIComponentTag} instance onto our component * tag stack, creating a stack if necessary.</p> */ private void pushUIComponentClassicTagBase() { List<UIComponentClassicTagBase> list = TypedCollections.dynamicallyCastList((List) context.getAttributes().get(COMPONENT_TAG_STACK_ATTR), UIComponentClassicTagBase.class); if (list == null) { //noinspection CollectionWithoutInitialCapacity list = new ArrayList<UIComponentClassicTagBase>(); context.getAttributes().put(COMPONENT_TAG_STACK_ATTR, list); } list.add(this); }
/** * Dynamically check that the members of the list are all instances of * the given type (or null). * * @param <E> * the list's element type * @param list * the list to cast * @param type * the class of the list's element type. * @return the dynamically-type checked list. * @throws java.lang.ClassCastException */ @SuppressWarnings("unchecked") static <E> List<E> dynamicallyCastList(List<?> list, Class<E> type) { return dynamicallyCastCollection(list, type, List.class); }