build the drawers content only. This will still return a Result object, but only with the content set. No inflating of a DrawerLayout.

@return Result object with only the content set
502591
public Drawer buildView() {
        // get the slider view
        mSliderLayout = (ScrimInsetsRelativeLayout) mActivity.getLayoutInflater().inflate(R.layout.material_drawer_slider, mDrawerLayout, false);
        mSliderLayout.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(mActivity, R.attr.material_drawer_background, R.color.material_drawer_background));
        // get the layout params
        DrawerLayout.LayoutParams params = (DrawerLayout.LayoutParams) mSliderLayout.getLayoutParams();
        if (params != null) {
            // if we've set a custom gravity set it
            params.gravity = mDrawerGravity;
            // if this is a drawer from the right, change the margins :D
            params = DrawerUtils.processDrawerLayoutParams(this, params);
            // set the new layout params
            mSliderLayout.setLayoutParams(params);
        }

        //create the content
        createContent();

        //create the result object
        Drawer result = new Drawer(this);
        //set the drawer for the accountHeader if set
        if (mAccountHeader != null) {
            mAccountHeader.setDrawer(result);
        }

        //toggle selection list if we were previously on the account list
        if (mSavedInstance != null && mSavedInstance.getBoolean(Drawer.BUNDLE_DRAWER_CONTENT_SWITCHED, false)) {
            mAccountHeader.toggleSelectionList(mActivity);
        }

        //handle if the drawer should be shown on launch
        handleShowOnLaunch();

        //we only want to hook a Drawer to the MiniDrawer if it is the main drawer, not the appended one
        if (!mAppended && mGenerateMiniDrawer) {
            // if we should create a MiniDrawer we have to do this now
            mMiniDrawer = new MiniDrawer().withDrawer(result).withAccountHeader(mAccountHeader);
        }

        //forget the reference to the activity
        mActivity = null;

        return result;
    }
1063360
public List<MaterialSection> getSectionList() {
        List<MaterialSection> list = new LinkedList<>();

        for(MaterialSection section : sectionList)
            list.add(section);

        for(MaterialSection section : bottomSectionList)
            list.add(section);

        return list;
    }
888711
public Resource build() {
        Resource resource = null;
        if (_url != null) {
            resource = _kieResources.newUrlResource(_url);
            if (resource != null) {
                if (_resourceType != null) {
                    resource.setResourceType(_resourceType);
                }
                if (_resourceConfiguration != null) {
                    resource.setConfiguration(_resourceConfiguration);
                }
            }
        }
        return resource;
    }
1312020
public FrameLayout getContent() {
        if (mContentView == null && this.mDrawerBuilder.mDrawerLayout != null) {
            mContentView = (FrameLayout) this.mDrawerBuilder.mDrawerLayout.findViewById(R.id.content_layout);
        }
        return mContentView;
    }
1082049
public Description build() {
        if (null == name) {
            throw new IllegalStateException("name is not set");
        }
        final String title1 = null != title ? title : name;
        final List<Property> properties1 = buildProperties();
        final Map<String, String> mapping1 = Collections.unmodifiableMap(mapping);
        final Map<String, String> mapping2 = Collections.unmodifiableMap(fwkmapping);
        final Map<String, String> metadata2 = Collections.unmodifiableMap(metadata);
        return new Description() {
            @Override
            public String getName() {
                return name;
            }

            @Override
            public String getTitle() {
                return title1;
            }

            @Override
            public String getDescription() {
                return description;
            }

            @Override
            public List<Property> getProperties() {
                return properties1;
            }

            @Override
            public Map<String, String> getPropertiesMapping() {
                return mapping1;
            }

            @Override
            public Map<String, String> getFwkPropertiesMapping() {
                return mapping2;
            }

            @Override
            public Map<String, String> getMetadata() {
                return metadata2;
            }

            @Override
            public String toString() {
                return "PropertyDescription{" +
                        "name = " + getName() + ", " +
                        "title = " + getTitle() + ", " +
                        "description = " + getDescription() + ", " +
                        "properties = " + getProperties() + ", " +
                        "mapping = " + getPropertiesMapping() +
                        "frameworkMapping = " + getFwkPropertiesMapping() +
                        "metadata = " + metadata2 +
                        "}";
            }
        };
    }
1186653
public Set entrySet() throws ObjectManagerException {
        return new AbstractSetView() {
            public long size() {
                return size;
            }

            public boolean contains(Object object) throws ObjectManagerException {
                if (object instanceof Map.Entry) {
                    Map.Entry entry = (Map.Entry) object;
                    Object v1 = get(entry.getKey()), v2 = entry.getValue();
                    return v1 == null ? v2 == null : v1.equals(v2);
                }
                return false;
            }

            public Iterator iterator() throws ObjectManagerException {
                return makeTreeMapIterator(new AbstractMapEntry.Type() {
                    public Object get(AbstractMapEntry entry) {
                        return entry;
                    }
                });
            }
        };
    }
522576
protected HorizontalLayout buildTitleLayout() {
        titleLayout = new HorizontalLayout();
        titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
        titleLayout.setSpacing(false);
        titleLayout.setMargin(false);
        titleLayout.setSizeFull();
        titleLayout.addComponent(title);
        titleLayout.setComponentAlignment(title, Alignment.TOP_LEFT);
        titleLayout.setExpandRatio(title, 0.8F);

        if (hasHeaderMaximizeSupport()) {
            titleLayout.addComponents(getHeaderMaximizeSupport().maxMinButton);
            titleLayout.setComponentAlignment(getHeaderMaximizeSupport().maxMinButton, Alignment.TOP_RIGHT);
            titleLayout.setExpandRatio(getHeaderMaximizeSupport().maxMinButton, 0.2F);
        }

        return titleLayout;
    }
435662
public final T build() {
        T dialog = buildDialog();
        if(!extraWindowHints.isEmpty()) {
            Set<Window.Hint> combinedHints = new HashSet<Window.Hint>(dialog.getHints());
            combinedHints.addAll(extraWindowHints);
            dialog.setHints(combinedHints);
        }
        return dialog;
    }
1078527
private void createContent() {
        //if we have a customView use this
        if (mCustomView != null) {
            LinearLayout.LayoutParams contentParams = new LinearLayout.LayoutParams(
                    ViewGroup.LayoutParams.MATCH_PARENT,
                    ViewGroup.LayoutParams.MATCH_PARENT
            );
            contentParams.weight = 1f;
            mSliderLayout.addView(mCustomView, contentParams);
            return;
        }

        //set the shadow for the drawer
        if (Build.VERSION.SDK_INT < 21 && mDrawerLayout != null) {
            if (ViewCompat.getLayoutDirection(mRootView) == ViewCompat.LAYOUT_DIRECTION_LTR) {
                mDrawerLayout.setDrawerShadow(mDrawerGravity == GravityCompat.START ? R.drawable.material_drawer_shadow_right : R.drawable.material_drawer_shadow_left, mDrawerGravity);
            } else {
                mDrawerLayout.setDrawerShadow(mDrawerGravity == GravityCompat.START ? R.drawable.material_drawer_shadow_left : R.drawable.material_drawer_shadow_right, mDrawerGravity);
            }
        }

        // if we have an adapter (either by defining a custom one or the included one add a list :D
        View contentView;
        if (mRecyclerView == null) {
            contentView = LayoutInflater.from(mActivity).inflate(R.layout.material_drawer_recycler_view, mSliderLayout, false);
            mRecyclerView = (RecyclerView) contentView.findViewById(R.id.material_drawer_recycler_view);
            //set the itemAnimator
            mRecyclerView.setItemAnimator(mItemAnimator);
            //some style improvements on older devices
            mRecyclerView.setFadingEdgeLength(0);

            //set the drawing cache background to the same color as the slider to improve performance
            //mRecyclerView.setDrawingCacheBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(mActivity, R.attr.material_drawer_background, R.color.material_drawer_background));
            mRecyclerView.setClipToPadding(false);
            //additional stuff
            mRecyclerView.setLayoutManager(mLayoutManager);

            int paddingTop = 0;
            if ((mDisplayBelowStatusBar == null || mDisplayBelowStatusBar) && !mSystemUIHidden) {
                paddingTop = UIUtils.getStatusBarHeight(mActivity);
            }
            int paddingBottom = 0;
            int orientation = mActivity.getResources().getConfiguration().orientation;
            if (((mTranslucentNavigationBar || mFullscreen) && Build.VERSION.SDK_INT >= 21) && !mSystemUIHidden
                    && (orientation == Configuration.ORIENTATION_PORTRAIT
                    || (orientation == Configuration.ORIENTATION_LANDSCAPE
                    && DrawerUIUtils.isSystemBarOnBottom(mActivity)))) {
                paddingBottom = UIUtils.getNavigationBarHeight(mActivity);
            }

            mRecyclerView.setPadding(0, paddingTop, 0, paddingBottom);
        } else {
            contentView = mRecyclerView;
        }

        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT
        );
        params.weight = 1f;
        mSliderLayout.addView(contentView, params);

        if (mInnerShadow) {
            View innerShadow = mSliderLayout.findViewById(R.id.material_drawer_inner_shadow);
            innerShadow.setVisibility(View.VISIBLE);
            innerShadow.bringToFront();
            if (mDrawerGravity == GravityCompat.START) {
                innerShadow.setBackgroundResource(R.drawable.material_drawer_shadow_left);
            } else {
                innerShadow.setBackgroundResource(R.drawable.material_drawer_shadow_right);
            }
        }

        // set the background
        if (mSliderBackgroundColor != 0) {
            mSliderLayout.setBackgroundColor(mSliderBackgroundColor);
        } else if (mSliderBackgroundColorRes != -1) {
            mSliderLayout.setBackgroundColor(ContextCompat.getColor(mActivity, mSliderBackgroundColorRes));
        } else if (mSliderBackgroundDrawable != null) {
            UIUtils.setBackground(mSliderLayout, mSliderBackgroundDrawable);
        } else if (mSliderBackgroundDrawableRes != -1) {
            UIUtils.setBackground(mSliderLayout, mSliderBackgroundDrawableRes);
        }

        //handle the header
        DrawerUtils.handleHeaderView(this);

        //handle the footer
        DrawerUtils.handleFooterView(this, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                IDrawerItem drawerItem = (IDrawerItem) v.getTag(R.id.material_drawer_item);
                DrawerUtils.onFooterDrawerItemClick(DrawerBuilder.this, drawerItem, v, true);
            }
        });

        //if MultiSelect is possible
        mAdapter.withMultiSelect(mMultiSelect);
        if (mMultiSelect) {
            mAdapter.withSelectOnLongClick(false);
            mAdapter.withAllowDeselection(true);
        }

        //set the adapter on the listView
        if (mAdapterWrapper == null) {
            mRecyclerView.setAdapter(mAdapter);
        } else {
            mRecyclerView.setAdapter(mAdapterWrapper);
        }

        //predefine selection (should be the first element
        if (mSelectedItemPosition == 0 && mSelectedItemIdentifier != 0L) {
            mSelectedItemPosition = DrawerUtils.getPositionByIdentifier(this, mSelectedItemIdentifier);
        }
        if (mHeaderView != null && mSelectedItemPosition == 0) {
            mSelectedItemPosition = 1;
        }
        mAdapter.deselect();
        mAdapter.select(mSelectedItemPosition);

        // add the onDrawerItemClickListener if set
        mAdapter.withOnClickListener(new OnClickListener<IDrawerItem>() {
            @Override
            public boolean onClick(final View view, IAdapter<IDrawerItem> adapter, final IDrawerItem item, final int position) {
                if (!(item != null && item instanceof Selectable && !item.isSelectable())) {
                    resetStickyFooterSelection();
                    mCurrentStickyFooterSelection = -1;
                }

                //call the listener
                boolean consumed = false;

                //call the item specific listener
                if (item instanceof AbstractDrawerItem && ((AbstractDrawerItem) item).getOnDrawerItemClickListener() != null) {
                    consumed = ((AbstractDrawerItem) item).getOnDrawerItemClickListener().onItemClick(view, position, item);
                }

                //call the drawer listener
                if (mOnDrawerItemClickListener != null) {
                    if (mDelayDrawerClickEvent > 0) {
                        new Handler().postDelayed(new Runnable() {
                            @Override
                            public void run() {
                                mOnDrawerItemClickListener.onItemClick(view, position, item);
                            }
                        }, mDelayDrawerClickEvent);
                    } else {
                        consumed = mOnDrawerItemClickListener.onItemClick(view, position, item);
                    }
                }

                //we have to notify the miniDrawer if existing, and if the event was not consumed yet
                if (!consumed && mMiniDrawer != null) {
                    consumed = mMiniDrawer.onItemClick(item);
                }

                //if we were a expandable item we consume the event closing makes no sense
                if (item instanceof IExpandable && ((IExpandable) item).getSubItems() != null) {
                    //we consume the event and want no further handling
                    return true;
                }


                if (!consumed) {
                    //close the drawer after click
                    closeDrawerDelayed();
                }

                return consumed;
            }
        });
        // add the onDrawerItemLongClickListener if set
        mAdapter.withOnLongClickListener(new OnLongClickListener<IDrawerItem>() {
            @Override
            public boolean onLongClick(View view, IAdapter<IDrawerItem> adapter, final IDrawerItem item, final int position) {
                if (mOnDrawerItemLongClickListener != null) {
                    return mOnDrawerItemLongClickListener.onItemLongClick(view, position, getDrawerItem(position));
                }
                return false;
            }
        });

        if (mRecyclerView != null) {
            mRecyclerView.scrollToPosition(0);
        }

        // try to restore all saved values again
        if (mSavedInstance != null) {
            if (!mAppended) {
                mAdapter.deselect();
                mAdapter.withSavedInstanceState(mSavedInstance, Drawer.BUNDLE_SELECTION);
                DrawerUtils.setStickyFooterSelection(this, mSavedInstance.getInt(Drawer.BUNDLE_STICKY_FOOTER_SELECTION, -1), null);
            } else {
                mAdapter.deselect();
                mAdapter.withSavedInstanceState(mSavedInstance, Drawer.BUNDLE_SELECTION_APPENDED);
                DrawerUtils.setStickyFooterSelection(this, mSavedInstance.getInt(Drawer.BUNDLE_STICKY_FOOTER_SELECTION_APPENDED, -1), null);
            }
        }

        // call initial onClick event to allow the dev to init the first view
        if (mFireInitialOnClick && mOnDrawerItemClickListener != null) {
            int selection = mAdapter.getSelections().size() == 0 ? -1 : mAdapter.getSelections().iterator().next();
            mOnDrawerItemClickListener.onItemClick(null, selection, getDrawerItem(selection));
        }
    }
576651
protected RawData __getSection() {
        return S.raw(S.isEmpty(layoutContent) ? layoutSections.get("__CONTENT__") : layoutContent);
    }
1035116
public @NotNull String build() {
    SortedMap<String, Object> sortedParameterMap = new TreeMap<>(parameterMap);

    // gather resource paths in a treeset (having them in a defined order helps with caching)
    SortedSet<String> resourcePathsSet = new TreeSet<>();

    // iterate over all parts that should be kept from the current request
    for (String nextPart : initialSuffixParts) {
      // if this is a key-value-part:
      if (nextPart.indexOf(KEY_VALUE_DELIMITER) > 0) {
        String key = decodeKey(nextPart);
        // decode and keep the part if it is not overridden in the given parameter-map
        if (!sortedParameterMap.containsKey(key)) {
          String value = decodeValue(nextPart);
          sortedParameterMap.put(key, value);
        }
      }
      else {
        // decode and keep the resource paths (unless they are specified again in resourcePaths)
        String path = decodeResourcePathPart(nextPart);
        if (!resourcePaths.contains(path)) {
          resourcePathsSet.add(path);
        }
      }
    }

    // copy the resources specified as parameters to the sorted set of paths
    if (resourcePaths != null) {
      resourcePathsSet.addAll(ImmutableList.copyOf(resourcePaths));
    }

    // gather all suffix parts in this list
    List<String> suffixParts = new ArrayList<>();

    // now encode all resource paths
    for (String path : resourcePathsSet) {
      suffixParts.add(encodeResourcePathPart(path));
    }

    // now encode all entries from the parameter map
    for (Entry<String, Object> entry : sortedParameterMap.entrySet()) {
      Object value = entry.getValue();
      if (value == null) {
        // don't add suffix part if value is null
        continue;
      }
      String encodedKey = encodeKeyValuePart(entry.getKey());
      String encodedValue = encodeKeyValuePart(value.toString());
      suffixParts.add(encodedKey + KEY_VALUE_DELIMITER + encodedValue);
    }

    // finally join these parts to a single string
    return StringUtils.join(suffixParts, SUFFIX_PART_DELIMITER);
  }
533501
public java.util.List<WorkspacesIpGroup> getResult() {
        if (result == null) {
            result = new com.amazonaws.internal.SdkInternalList<WorkspacesIpGroup>();
        }
        return result;
    }
348582
public function
	Build() {
	/*//
	compile the files down to the final form.
	//*/

		if($this->Print) {
			header(sprintf(
				"Content-type: %s",
				$this->GetFullContentType()
			));
		}

		$ds = DIRECTORY_SEPARATOR;
		$source = '';
		$filelist = $this->FindTheFiles();
		$outfile = sprintf(
			"%s{$ds}%s{$ds}%s",
			$this->OutputDir,
			$this->DistDir,
			$this->OutputFile
		);

		if($this->AddScriptHeader) $this->AppendScriptHeader(
			$filelist,
			$source
		);

		foreach($filelist as $filepath)
		$this->AppendFile($filepath,$source);

		if($this->OutputFile) {
			if(!$this->WriteToDisk($outfile,$source)) {
				echo $this->GetComment(
					$this->Print,
					"INFO: output was unchanged with this build.",
					$source
				);

				if($this->Print)
				echo PHP_EOL;
			}
		}

		if($this->Print) {
			echo $source, PHP_EOL;
		}

		return $this;
	}
369765
private JPanel createContentCanvas()
    {
        if (contentCanvas != null)
        {
            contentCanvas = new BrowserPanel(proc.getPage());
            contentCanvas.setLayout(null);
            selection = new Selection();
            contentCanvas.add(selection);
            selection.setVisible(false);
            selection.setLocation(0, 0);
        }
        return contentCanvas;
    }
552198
public function getPartBuilderFactory()
    {
        if ($this->partBuilderFactory === null) {
            $this->partBuilderFactory = new PartBuilderFactory(
                $this->getHeaderFactory()
            );
        }
        return $this->partBuilderFactory;
    }
357276
public Tree<T> build() {
        Tree<T> result = base;
        if (null == base && treeStack.size() == 1) {
            result = treeStack.get(0);
        } else if (treeStack.size() > 0) {
            result = new TreeStack<T>(treeStack, base);
        }else if(null==base) {
            throw new IllegalArgumentException("base tree was not set");
        }

        return result;
    }
11695
private function GrantCreateLayout()
    {
        $groups = $this->GetGroups();
        foreach ($groups as $group)
        {
            if ($group->GetCreateLayouts())
            {
                return GrantResult::Allowed();
            }
        }
        return GrantResult::NoAccess();
    }