Returns the layout for a particular generation of this layout's type.

@throws FetchNoneException if generation not found
760119
public Layout getGeneration(int generation) throws FetchNoneException, FetchException {
        try {
            Storage<StoredLayoutEquivalence> equivStorage =
                mLayoutFactory.mRepository.storageFor(StoredLayoutEquivalence.class);
            StoredLayoutEquivalence equiv = equivStorage.prepare();
            equiv.setStorableTypeName(getStorableTypeName());
            equiv.setGeneration(generation);
            if (equiv.tryLoad()) {
                generation = equiv.getMatchedGeneration();
            }
        } catch (RepositoryException e) {
            throw e.toFetchException();
        }

        return new Layout(mLayoutFactory, getStoredLayoutByGeneration(generation));
    }
1225738
public IGeneratorSet getGenerators() {
    if( generatorSet_ == null && generatorSetRef_ != null)
      {
      try( GeneratorSetResource resource = GeneratorSetResource.at( urlFor( generatorSetRef_)))
        {
        generatorSet_ = resource.getGeneratorSet();
        }
      catch( Exception e)
        {
        throw new GeneratorSetException( String.format( "Can't read resource at %s", generatorSetRef_), e);
        }
      }
    return generatorSet_;
    }
1374920
@Override
	public Layout<AbstractType,String> getConfiguredLayout() {
		return new StaticLayout<AbstractType,String>( this.graph, this, getGraphDimension());
	}
159210
public function getLayoutOptions()
    {
        if (!($theme = Theme::getEditTheme())) {
            throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
        }

        $layouts = Layout::listInTheme($theme, true);
        $result = [];
        $result[null] = Lang::get('cms::lang.page.no_layout');

        foreach ($layouts as $layout) {
            $baseName = $layout->getBaseFileName();

            if (FileDefinitions::isPathIgnored($baseName)) {
                continue;
            }

            $result[$baseName] = strlen($layout->name) ? $layout->name : $baseName;
        }

        return $result;
    }
3952
def get(self, layout, default=None):
        

        try:
            return self.__getitem__(layout)
        except KeyError as error:
            return default
1071285
private Layout getActiveLayout(Project phoenixProject)
   {
      //
      // Start with the first layout we find
      //
      Layout activeLayout = phoenixProject.getLayouts().getLayout().get(0);

      //
      // If this isn't active, find one which is... and if none are,
      // we'll just use the first.
      //
      if (!activeLayout.isActive().booleanValue())
      {
         for (Layout layout : phoenixProject.getLayouts().getLayout())
         {
            if (layout.isActive().booleanValue())
            {
               activeLayout = layout;
               break;
            }
         }
      }

      return activeLayout;
   }
743427
public Layout previousGeneration() throws FetchException {
        Cursor<StoredLayout> cursor = mLayoutFactory.mLayoutStorage
            .query("storableTypeName = ? & generation < ?")
            .with(getStorableTypeName()).with(getGeneration())
            .orderBy("-generation")
            .fetch();

        try {
            if (cursor.hasNext()) {
                return new Layout(mLayoutFactory, cursor.next());
            }
        } finally {
            cursor.close();
        }

        return null;
    }
23218
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = {
        CascadeType.ALL
    })
    @JoinColumn(name = "GENERATION")
    public org.openprovenance.prov.model.QualifiedName getGeneration() {
        return generation;
    }
489443
public List<LayoutProperty> getAllProperties() throws FetchException {
        List<LayoutProperty> all = mAllProperties;

        if (all == null) {
            Cursor <StoredLayoutProperty> cursor = mLayoutFactory.mPropertyStorage
                .query("layoutID = ?")
                .with(mStoredLayout.getLayoutID())
                .orderBy("ordinal")
                .fetch();

            try {
                List<LayoutProperty> list = new ArrayList<LayoutProperty>();

                while (cursor.hasNext()) {
                    list.add(new LayoutProperty(cursor.next()));
                }

                mAllProperties = all = Collections.unmodifiableList(list);
            } finally {
                cursor.close();
            }
        }

        return all;
    }
63218
private View getNextView(RecyclerView parent) {
        View firstView = parent.getChildAt(0);

        // draw the first visible child's header at the top of the view
        int firstPosition = parent.getChildPosition(firstView);
        View firstHeader = getHeaderView(parent, firstPosition);

        for (int i = 0; i < parent.getChildCount(); i++) {

            View child = parent.getChildAt(i);
            RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) child.getLayoutParams();

            if (getOrientation(parent) == LinearLayoutManager.VERTICAL) {

                if (child.getTop() - layoutParams.topMargin > firstHeader.getHeight()) {
                    return child;
                }

            } else {

                if (child.getLeft() - layoutParams.leftMargin > firstHeader.getWidth()) {
                    return child;
                }

            }
        }
        return null;
    }
216922
def get_layout(self, page):
        
        if type(page) == int:
            page = self.get_page(page)
        self.interpreter.process_page(page)
        layout = self.device.get_result()
        layout = self._add_annots(layout, page.annots)
        return layout
1326116
private static <T, G extends T> void generateOnLayoutMethod(DexMaker dexMaker,
                                                                TypeId<G> generatedType,
                                                                TypeId<T> baseType) {
        final FieldId<G, Interceptor> interceptorField =
                generatedType.getField(INTERCEPTOR_TYPE, FIELD_NAME_INTERCEPTOR);

        final String methodName = ViewMethod.ON_LAYOUT.getName();

        final MethodId<T, Void> superMethod = baseType.getMethod(VOID_TYPE, methodName,
                TypeId.BOOLEAN, TypeId.INT, TypeId.INT, TypeId.INT, TypeId.INT);
        final MethodId<Interceptor, Void> onLayoutMethod =
                INTERCEPTOR_TYPE.getMethod(VOID_TYPE, methodName, VIEW_TYPE, TypeId.BOOLEAN,
                        TypeId.INT, TypeId.INT, TypeId.INT, TypeId.INT);

        final MethodId<G, Void> methodId = generatedType.getMethod(VOID_TYPE, methodName,
                TypeId.BOOLEAN, TypeId.INT, TypeId.INT, TypeId.INT, TypeId.INT);
        final Code code = dexMaker.declare(methodId, PUBLIC);

        final Local<G> localThis = code.getThis(generatedType);
        final Local<Interceptor> nullInterceptor = code.newLocal(INTERCEPTOR_TYPE);
        final Local<Interceptor> localInterceptor = code.newLocal(INTERCEPTOR_TYPE);
        final Local<Boolean> localChanged = code.getParameter(0, TypeId.BOOLEAN);
        final Local<Integer> localLeft = code.getParameter(1, TypeId.INT);
        final Local<Integer> localTop = code.getParameter(2, TypeId.INT);
        final Local<Integer> localRight = code.getParameter(3, TypeId.INT);
        final Local<Integer> localBottom = code.getParameter(4, TypeId.INT);

        code.iget(interceptorField, localInterceptor, localThis);
        code.loadConstant(nullInterceptor, null);

        // Interceptor is not null, call it.
        final Label interceptorNullCase = new Label();
        code.compare(Comparison.EQ, interceptorNullCase, nullInterceptor, localInterceptor);
        code.invokeVirtual(onLayoutMethod, null, localInterceptor, localThis, localChanged,
                localLeft, localTop, localRight, localBottom);
        code.returnVoid();

        // Interceptor is null, call super method.
        code.mark(interceptorNullCase);
        code.invokeSuper(superMethod, null, localThis, localChanged, localLeft, localTop,
                localRight, localBottom);
        code.returnVoid();

        final MethodId<G, Void> callsSuperMethod = generatedType.getMethod(VOID_TYPE,
                ViewMethod.ON_LAYOUT.getInvokeName(), TypeId.BOOLEAN, TypeId.INT, TypeId.INT,
                TypeId.INT, TypeId.INT);

        final Code superCode = dexMaker.declare(callsSuperMethod, PUBLIC);

        final Local<G> superThis = superCode.getThis(generatedType);
        final Local<Boolean> superLocalChanged = superCode.getParameter(0, TypeId.BOOLEAN);
        final Local<Integer> superLocalLeft = superCode.getParameter(1, TypeId.INT);
        final Local<Integer> superLocalTop = superCode.getParameter(2, TypeId.INT);
        final Local<Integer> superLocalRight = superCode.getParameter(3, TypeId.INT);
        final Local<Integer> superLocalBottom = superCode.getParameter(4, TypeId.INT);
        superCode.invokeSuper(superMethod, null, superThis, superLocalChanged, superLocalLeft,
                superLocalTop, superLocalRight, superLocalBottom);
        superCode.returnVoid();
    }
343782
protected @Nonnull <T> Collection<T> getBeansOfType(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType) {
        return getBeansOfTypeInternal(resolutionContext, beanType, null);
    }
611415
public static long getNextGenerationId() {
        // ENG-14511- these calls may hit assertion failures in testing environments
        try {
            return UniqueIdGenerator.makeIdFromComponents(System.currentTimeMillis(),
                    m_generationId.incrementAndGet(),
                    MpInitiator.MP_INIT_PID);
        }
        catch (Throwable t) {
            // Try resetting the generation
            m_generationId.set(0L);
            return UniqueIdGenerator.makeIdFromComponents(System.currentTimeMillis(),
                    m_generationId.incrementAndGet(),
                    MpInitiator.MP_INIT_PID);
        }
    }
947706
protected GeneratorConfig createDefaultGeneratorConfig() {
		final GeneratorConfig config = new GeneratorConfig();
		if (this.defaultVersion == null) {
			this.defaultVersion = JavaVersion.fromQualifier(System.getProperty("java.specification.version")); //$NON-NLS-1$
			if (this.defaultVersion != null) {
				config.setJavaSourceVersion(this.defaultVersion);
			}
		} else {
			config.setJavaSourceVersion(this.defaultVersion);
		}
		return config;
	}
1087037
function () {
				var oObjectPageLayoutInstance = null;
				if (this._oComponent && this._oComponent._oView) {
					oObjectPageLayoutInstance = this._oComponent._oView.byId("ObjectPageLayout");
				} else {
					Log.error("ObjectPageComponentContainer :: cannot find children ObjectPageLayout, has it been rendered already?");
				}

				return oObjectPageLayoutInstance;
			}
77145
function getLayout(layout) {
    if (!layoutCache.hasOwnProperty(layout)) {
      var layoutContents = false,
          layoutPath = path.join(
        path.isAbsolute(options.layoutPath) ?
          options.layoutPath : path.join(process.cwd(), options.layoutPath),
        layout
      );
      try {
        layoutContents = fs.readFileSync(layoutPath, 'utf8');
      } catch (err) {
        throw new PluginError(logFlag, 'Could not read layout: \'' + layoutPath + '\'\n');
      }
      layoutCache[layout] = {
        contents: layoutContents,
        path: layoutPath
      };
    }
    return layoutCache[layout];
  }