Defines the structure of this class.

@param ClassDefinition $class
480229
protected function define(ClassDefinition $class)
    {
        $class->property($this->name)->asString();

        $class->property($this->file)->asObject(File::class);
    }
298105
protected function buildAnnotationInstance(AnnotationDefinition $annotationDefinition)
    {
        $class = $this->getAnnotationClass($annotationDefinition->getTag());
        $annotation = new $class($annotationDefinition);

        return $annotation;
    }
182955
private function saveClassToFile(PhpClass $class)
    {
        if ($this->isValidClass($class)) {
            $file = new PhpFile($class->getIdentifier());

            $namespace = $this->config->get('namespaceName');
            if (!empty($namespace)) {
                $file->addNamespace($namespace);
            }

            $file->addClass($class);
            $file->save($this->dir);
        }
    }
200571
public function define_columns($columns) {
        parent::define_columns($columns);
        foreach ($this->columns as $column => $column) {
            // Automatically assign classes to columns.
            $this->column_class[$column] = ' ' . $column;
        }
    }
1175807
protected function define(ClassDefinition $class)
    {
        $class->property($this->lat)->asFloat();
        $class->property($this->lng)->asFloat();
    }
253778
protected void setTTEClassDefinition(String tteClass, Identification id, Attributes attr) {
	this.tteCD = ClassDefinitionImpl.toClassDefinition(tteClass, id, attr);
    }
1029599
protected function defineEntity(ClassDefinition $class)
    {
        $class->property($this->article)->asObject(BlogArticle::class);

        $class->property($this->authorName)->asString();

        $class->property($this->authorEmail)->asObject(EmailAddress::class);

        $class->property($this->content)->asString();

        $class->property($this->postedAt)->asObject(DateTime::class);

        $this->defineMetadata($class);
    }
124399
protected function define(ClassDefinition $class)
    {
        $class->property($this->name)->asString();

        $class->property($this->text)->asString();
    }
510199
public function afterCompile(ClassType $class): void
	{
		$config = $this->validateConfig($this->defaults);

		if ($config['debugger']['panel'] === true) {
			$initialize = $class->getMethod('initialize');
			$initialize->addBody(
				'$this->getService(?)->addPanel($this->getService(?));',
				['tracy.bar', $this->prefix('queryPanel')]
			);
			$initialize->addBody(
				'$this->getService(?)->getConfiguration()->getSqlLogger()->addLogger($this->getService(?));',
				[$this->prefix('connection'), $this->prefix('queryPanel')]
			);
			$initialize->addBody(
				'$this->getService(?)->addPanel(new ?);',
				['tracy.blueScreen', ContainerBuilder::literal(DbalBlueScreen::class)]
			);
		}
	}
875023
private function addDiscriminatorColumnDefinition($class, Table $table)
    {
        $discrColumn = $class->discriminatorColumn;

        if ( ! isset($discrColumn['type']) ||
            (strtolower($discrColumn['type']) == 'string' && $discrColumn['length'] === null)
        ) {
            $discrColumn['type'] = 'string';
            $discrColumn['length'] = 255;
        }

        $options = array(
            'length'    => isset($discrColumn['length']) ? $discrColumn['length'] : null,
            'notnull'   => true
        );

        if (isset($discrColumn['columnDefinition'])) {
            $options['columnDefinition'] = $discrColumn['columnDefinition'];
        }

        $table->addColumn($discrColumn['name'], $discrColumn['type'], $options);
    }
268616
protected function defineConstructor(ClassDefinition $classDefinition, $path)
    {
        $classDefinition->defineConstructor()
            ->defineParameter('path')
                ->defineDependency(new StringReference($path))
            ->end()
        ->end();
    }
231277
protected function buildClass(ClassDefinition $class, $indent)
    {
        $source = <<<EOF
<?php

namespace {$class->getNamespace()};


EOF;

        $source .= (new DocBlock($class->getDocBlock(), ''))."\n";

        if ($class->isFinal()) {
            $source .= 'final ';
        } elseif ($class->isAbstract()) {
            $source .= 'abstract ';
        }

        $source .= $class->getType().' '.$class->getName();

        if ($class->getExtendsClass()) {
            $extendsClassDefinition = $class->getExtendsClassDefinition();
            if (!$extendsClassDefinition) {
                throw new \RuntimeException('Class "'.$class->getName().'" does not have a extendsClassDefinition');
            }

            $source .= ' extends '.($extendsClassDefinition->isBundled() ? '' : '\\').trim($extendsClassDefinition->getCompleteName(), '\\');
        }

        if ($implementedInterfaces = $class->getImplementedInterfaces()) {
            $interfaces = array_map(function ($val) {
                return '\\'.trim($val, '\\');
            }, $implementedInterfaces);

            $keyword = 'interface' == $class->getType() ? ' extends ' : ' implements ';
            $source .= $keyword.implode(', ', $interfaces);
        }

        $source .= PHP_EOL.'{'.PHP_EOL;

        foreach ($class->getConstants() as $constant) {
            $source .= $this->buildConstant($constant, $indent).PHP_EOL.PHP_EOL;
        }

        foreach ($class->getProperties() as $property) {
            $source .= $this->buildProperty($property, $indent).PHP_EOL.PHP_EOL;
        }

        $source .= PHP_EOL;

        foreach ($class->getMethods() as $method) {
            if ($method->isInternal()) {
                continue;
            }

            $source .= $this->buildMethod($method, 'interface' === $class->getType(), $indent)."\n\n";
        }

        return $source.'}'.PHP_EOL;
    }
1117628
protected function define(ClassDefinition $class)
    {
        $class->property($this->name)->asString();

        $class->property($this->html)->asObject(Html::class);
    }
721195
public function afterCompile(ClassType $class): void
	{
		$config = $this->config;

		if ($config->debug === true) {
			$initialize = $class->getMethod('initialize');
			$initialize->addBody(
				'$this->getService(?)->addPanel($this->getService(?));',
				['tracy.bar', $this->prefix('panel')]
			);
		}
	}
546311
private function hydrateDefinitionClass(Definition $definition, array &$definitionArray)
    {
        if (null !== $definition->getClass()) {
            $definitionArray['class'] = $definition->getClass();
        }
    }
140217
protected function define(ClassDefinition $class)
    {
        $class->property($this->fullPath)->asString();

        $class->property($this->info)->nullable()->asObject(\SplFileInfo::class);
    }
1056201
public function finalize(FinalizedClassDefinition $class = null) : FinalizedFormObjectDefinition
    {
        return new FinalizedFormObjectDefinition(
                $class ?: $this->class->finalize(),
                $this->propertyFieldMap,
                $this->build()
        );
    }