------------------------------------------------------ @PostConstruct methods
509157
private List<PostConstructInfo> processPostConstruct(TypeElement type) {
        List<PostConstructInfo> postConstructs = new ArrayList<>();

        ElementFilter.methodsIn(type.getEnclosedElements()).stream()
                .filter(method -> MoreElements.isAnnotationPresent(method, PostConstruct.class))
                .forEach(method -> {

                    // verify method
                    if (method.getModifiers().contains(Modifier.PRIVATE)) {
                        abortWithError(method, "@%s method must not be private", PostConstruct.class.getSimpleName());
                    }
                    if (method.getModifiers().contains(Modifier.STATIC)) {
                        abortWithError(method, "@%s method must not be static", PostConstruct.class.getSimpleName());
                    }
                    if (!method.getReturnType().equals(typeUtils.getNoType(TypeKind.VOID))) {
                        abortWithError(method, "@%s method must return void", PostConstruct.class.getSimpleName());
                    }
                    if (!method.getParameters().isEmpty()) {
                        abortWithError(method, "@%s method must not have parameters",
                                PostConstruct.class.getSimpleName());
                    }

                    postConstructs.add(new PostConstructInfo(method.getSimpleName().toString()));
                });

        if (postConstructs.size() > 1) {
            warning(type, "%d methods annotated with @%s found. Order is not guaranteed!", postConstructs.size(),
                    PostConstruct.class.getSimpleName());
        }
        return postConstructs;
    }
332839
public function postInit()
    {
        foreach ($this->elements as $x => $field) {
            if ($field instanceof Form_Field) {
                $field->set($this->recall($x));

                if ($field->no_save || !$field->get()) {
                    continue;
                }

                // also apply the condition
                if ($this->view->model && $this->view->model->hasElement($x)) {

                    // take advantage of field normalization
                    $this->view->model->addCondition($x, $field->get());
                }
            }
        }

        // call applyFilter hook if such exist, pass model of associated view as parameter
        $this->hook('applyFilter', array($this->view->model));
    }
993668
protected function PostInsertHook()
    {
        parent::PostInsertHook();

        // we need to add an customer number to the order... since generation of this number may differ
        // from shop to shop, we have added the method to fetch a new customer number to the shop class
        if (empty($this->sqlData['customer_number']) || empty($this->sqlData['shop_id'])) {
            $aUpdateData = array();
            if (empty($this->sqlData['customer_number'])) {
                $aUpdateData['customer_number'] = $this->GetCustomerNumber();
            }
            if (empty($this->sqlData['shop_id'])) {
                $oShop = TdbShop::GetInstance();
                $aUpdateData['shop_id'] = $oShop->id;
            }
            if (count($aUpdateData) > 0) {
                $this->SaveFieldsFast($aUpdateData);
            }
        }
        TdbDataExtranetGroup::UpdateAutoAssignToUser($this);
    }
1129061
@PostConstruct
	protected void postConstruct() throws GeomajasException {
		if (null == baseTmsUrl) {
			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "baseTmsUrl");
		}

		// Make sure we have a base URL we can work with:
		if ((baseTmsUrl.startsWith("http://") || baseTmsUrl.startsWith("https://")) && !baseTmsUrl.endsWith("/")) {
			baseTmsUrl += "/";
		}

		// Make sure there is a correct RasterLayerInfo object:
		if (layerInfo == null || layerInfo == UNUSABLE_LAYER_INFO) {
			try {
				tileMap = configurationService.getCapabilities(this);
				version = tileMap.getVersion();
				extension = tileMap.getTileFormat().getExtension();
				layerInfo = configurationService.asLayerInfo(tileMap);
				usable = true;
			} catch (TmsLayerException e) {
				// a layer needs an info object to keep the DtoConfigurationPostProcessor happy !
				layerInfo = UNUSABLE_LAYER_INFO;
				usable = false;
				log.warn("The layer could not be correctly initialized: " + getId(), e);
			}
		} else if (extension == null) {
			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "extension");
		}

		if (layerInfo != null) {
			// Finally prepare some often needed values:
			state = new TileServiceState(geoService, layerInfo);
			// when proxying the real url will be resolved later on, just use a simple one for now
			boolean proxying = useCache || useProxy || null != authentication;
			if (tileMap != null && !proxying) {
				urlBuilder = new TileMapUrlBuilder(tileMap);
			} else {
				urlBuilder = new SimpleTmsUrlBuilder(extension);
			}
		}
	}
1367835
public LifecycleCallbackType<WebFragmentDescriptor> getOrCreatePostConstruct()
   {
      List<Node> nodeList = model.get("post-construct");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new LifecycleCallbackTypeImpl<WebFragmentDescriptor>(this, "post-construct", model, nodeList.get(0));
      }
      return createPostConstruct();
   }
1197033
public function initAfterConstruct()
    {
        session_start();
        if (isset($this->config['area'])) {
            $this->setArea($this->config['area']);
        }
        parent::initAfterConstruct();
    }
350543
public void postConstruct() {
        Assert.isTrue(this.spacing == null || this.spacing.length == 2,
                      GridLayer.class.getSimpleName() +
                              ".spacing has the wrong number of elements.  Expected 2 (x,y) but was: " +
                              Arrays.toString(this.spacing));
        Assert.isTrue(this.numberOfLines == null || this.numberOfLines.length == 2,
                      GridLayer.class.getSimpleName() +
                              ".numberOfLines has the wrong number of elements.  Expected 2 (x,y) but was: " +
                              Arrays.toString(this.numberOfLines));
        Assert.isTrue(this.pointsInLine > 2,
                      "There must be at least 2 points in a line.  There were: " + this.pointsInLine);
        Assert.isTrue(this.indent >= 0, "The indent is not permitted to be negative: " + this.indent);
        Assert.isTrue(this.labelColor != null, "labelColor should not be null");
        Assert.isTrue(this.haloColor != null, "haloColor should not be null");
        Assert.isTrue(this.font != null, "font should not be null");

        try {
            if (this.labelProjection != null) {
                if (this.longitudeFirst != null) {
                    this.labelCRS = CRS.decode(this.labelProjection, this.longitudeFirst);
                } else {
                    this.labelCRS = CRS.decode(this.labelProjection);
                }
            }
        } catch (FactoryException e) {
            throw new IllegalArgumentException("The projection code: " + this.labelProjection +
                                                       " is not valid. Error message when parsing code: " +
                                                       e.getMessage());
        }
        if (this.labelFormat != null || this.valueFormat != null || this.unitFormat != null) {
            GridLabelFormat format = GridLabelFormat.fromConfig(this);
            if (format == null) {
                throw new IllegalArgumentException("`labelFormat` or `valueFormat` must be set");
            }
            try {
                format.format(2.0, "m");
            } catch (IllegalFormatException e) {
                throw new IllegalArgumentException("Invalid label format");
            }
            this.gridLabelFormat = format;
        }
    }
1218134
@FFDCIgnore(InjectionException.class)
    private void processPostConstruct() {
        ApplicationClient appClient = ((ClientModuleMetaData) cmd.getModuleMetaData()).getAppClient();
        boolean isMetadataComplete = appClient.isMetadataComplete();
        LifecycleCallbackHelper helper = new LifecycleCallbackHelper(isMetadataComplete);
        List<LifecycleCallback> postConstruct = appClient.getPostConstruct();
        CallbackHandler loginCallbackHandler = cmi.getCallbackHandler();

        try {
            if (loginCallbackHandler != null) {
                helper.doPostConstruct(loginCallbackHandler, postConstruct);
            }
            helper.doPostConstruct(mainClass, postConstruct);
        } catch (InjectionException e) {
            Tr.error(tc, "INJECTION_POSTCONSTRUCT_CWWKC2452E", new Object[] { e.getLocalizedMessage() });
        }
    }
1365189
protected function afterConstruct() {
		if(count($this->defaultColumns) == 0) {
			/*
			$this->defaultColumns[] = array(
				'class' => 'CCheckBoxColumn',
				'name' => 'id',
				'selectableRows' => 2,
				'checkBoxHtmlOptions' => array('name' => 'trash_id[]')
			);
			*/
			$this->defaultColumns[] = array(
				'header' => 'No',
				'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'
			);
			$this->defaultColumns[] = 'parent_id';
			if(!Yii::app()->getRequest()->getParam('wall')) {
				$this->defaultColumns[] = array(
					'name' => 'wall_search',
					'value' => '$data->wall->wall_status',
				);
			}
			if(!Yii::app()->getRequest()->getParam('user')) {
				$this->defaultColumns[] = array(
					'name' => 'user_search',
					'value' => '$data->user->displayname',
				);
			}
			$this->defaultColumns[] = 'comment';
			$this->defaultColumns[] = array(
				'name' => 'creation_date',
				'value' => 'Yii::app()->dateFormatter->formatDateTime($data->creation_date, \'medium\', false)',
				'htmlOptions' => array(
					'class' => 'center',
				),
				'filter' => $this->filterDatepicker($this, 'creation_date'),
			);
			if(!Yii::app()->getRequest()->getParam('type')) {
				$this->defaultColumns[] = array(
					'name' => 'publish',
					'value' => 'Utility::getPublish(Yii::app()->controller->createUrl(\'publish\', array(\'id\'=>$data->comment_id)), $data->publish, 1)',
					'htmlOptions' => array(
						'class' => 'center',
					),
					'filter' => $this->filterYesNo(),
					'type' => 'raw',
				);
			}
		}
		parent::afterConstruct();
	}
542293
@PostConstruct
	protected void postConstruct() throws GeomajasException {
		if (null != crsDefinitions) {
			for (CrsInfo crsInfo : crsDefinitions.values()) {
				try {
					CoordinateReferenceSystem crs = CRS.parseWKT(crsInfo.getCrsWkt());
					String code = crsInfo.getKey();
					crsCache.put(code, CrsFactory.getCrs(code, crs));
				} catch (FactoryException e) {
					throw new GeomajasException(e, ExceptionCode.CRS_DECODE_FAILURE_FOR_MAP, crsInfo.getKey());
				}
			}
		}
		if (null != crsTransformDefinitions) {
			for (CrsTransformInfo crsTransformInfo : crsTransformDefinitions.values()) {
				String key = getTransformKey(crsTransformInfo);
				transformCache.put(key, getCrsTransform(key, crsTransformInfo));
			}
		}
		GeometryFactory factory = new GeometryFactory();
		EMPTY_GEOMETRIES.put(Point.class, factory.createPoint((Coordinate) null));
		EMPTY_GEOMETRIES.put(LineString.class, factory.createLineString((Coordinate[]) null));
		EMPTY_GEOMETRIES.put(Polygon.class, factory.createPolygon(null, null));
		EMPTY_GEOMETRIES.put(MultiPoint.class, factory.createMultiPoint((Coordinate[]) null));
		EMPTY_GEOMETRIES.put(MultiLineString.class, factory.createMultiLineString((LineString[]) null)); // cast needed!
		EMPTY_GEOMETRIES.put(MultiPolygon.class, factory.createMultiPolygon((Polygon[]) null)); // cast needed!
		EMPTY_GEOMETRIES.put(Geometry.class, factory.createGeometryCollection(null));
	}
1182529
public function registered_post_type( string $post_type, WP_Post_Type $post_type_object ) {
		if ( $post_type !== $this->post_type ) {
			return;
		}
		$struct = str_replace( "%{$this->post_type}_slug%", $this->post_slug, $post_type_object->rewrite['permastruct'] );
		$struct = str_replace( '%postname%', "%{$this->post_type}%", $struct );
		add_permastruct( $this->post_type, $struct, $post_type_object->rewrite );
	}
263637
@Override
    public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener,
            Throwable error) {
        //listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal());
        //listener.getLogger().println("[MavenDependenciesRecorder] dependencies: " + pom.getArtifacts());
        recordMavenDependencies(pom.getArtifacts());
        return true;
    }
180006
public void afterPropertiesSet() throws Exception {
        // Ensure that all post-processors requested are registered
        String[] actions = StringUtils.commaDelimitedListToStringArray( getPostProcessorActionsToRun() );
        for( int i = 0; i < actions.length; i++ ) {
            if( !postProcessorActionIds.contains( actions[i] ) ) {
                throw new IllegalArgumentException( "Requested post-processor action '" + actions[i]
                        + "' is not registered." );
            }
        }
    }
195176
@Override
	protected void postProcessContent(Map<String, Object> content) {
		replaceValue(getNestedMap(content, "commit"), "time",
				getProperties().getCommitTime());
		replaceValue(getNestedMap(content, "build"), "time",
				getProperties().getInstant("build.time"));
	}
1190385
@PostConstruct
	@SuppressWarnings("unused")
	protected void postConstruct() throws GeomajasException {
		crs = geoService.getCrs2(getLayerInfo().getCrs());
		srid = geoService.getSridFromCrs(crs);
		filterService.registerFeatureModel(featureModel);
		if (null == featureModel) {
			HibernateFeatureModel hibernateFeatureModel = applicationContext.getBean(HibernateFeatureModel.class);
			hibernateFeatureModel.setSessionFactory(getSessionFactory());
			hibernateFeatureModel.setLayerInfo(getLayerInfo());
			featureModel = hibernateFeatureModel;
		}

	}
427269
public function postBuild()
    {
        $types_build_path = $this->getBuildPath() ? "{$this->getBuildPath()}/types.php" : null;

        if ($types_build_path) {
            $result = [];

            $result[] = '<?php';
            $result[] = '';

            if ($this->getStructure()->getConfig('header_comment')) {
                $result = array_merge($result, explode("\n", $this->getStructure()->getConfig('header_comment')));
                $result[] = '';
            }

            $namespace = $this->getStructure()->getNamespace();

            if ($namespace) {
                $namespace = ltrim($namespace, '\\');
            }

            if ($this->getStructure()->getNamespace()) {
                $result[] = '/**';
                $result[] = ' * @package ' . $this->getStructure()->getNamespace();
                $result[] = ' */';
            }

            $result[] = 'return [';

            foreach ($this->getStructure()->getTypes() as $current_type) {
                $result[] = '    ' . var_export($namespace . '\\' . Inflector::classify(Inflector::singularize($current_type->getName())), true) . ',';
            }

            $result[] = '];';
            $result[] = '';

            $result = implode("\n", $result);

            if (is_file($types_build_path) && file_get_contents($types_build_path) === $result) {
                return;
            } else {
                file_put_contents($types_build_path, $result);
                $this->triggerEvent('on_types_built', [$types_build_path]);
            }
        }
    }
1132917
public function afterInsert()
    {
        /** @var \yii\db\ActiveRecord|\DevGroup\DataStructure\traits\PropertiesTrait $owner */
        $owner = $this->owner;
        $groups = $owner->propertyGroupIds;
        $owner->propertyGroupIds = null;
        $event = new HasPropertiesEvent();
        $event->model = $owner;
        HasPropertiesEvent::trigger(self::class, self::EVENT_AFTER_SAVE, $event);
        if (count($groups) > 0) {
            foreach ($groups as $group_id) {
                /** @var PropertyGroup $group */
                $group = PropertyGroup::findOne(['id' => $group_id]);
                if ($group) {
                    $owner->addPropertyGroup($group);
                }
            }
        }

        $handlers = PropertyStorageHelper::getHandlersForModel($owner);
        $models = [&$owner];
        foreach ($handlers as $handler) {
            $handler->modelsInserted($models);
        }
        $this->afterSave();
    }