@return Create a Description using a builder by analyzing the annotations on a plugin object, and including
annotations on fields as DescriptionProperties.

@param object  the object
@param builder builder
184175
public static Description buildDescription(final Object object, final DescriptionBuilder builder) {
        return buildDescription(object, builder, true);
    }
86607
public DescriptionBuilder property(final Consumer<PropertyBuilder> builder) {
        PropertyBuilder propertyBuilder = PropertyBuilder.builder();
        builder.accept(propertyBuilder);
        replaceOrAddProperty(propertyBuilder.build());
        return this;
    }
1257497
public static Builder newBuilder(Class<?> loggingClass) {
    if (loggingClass == null) throw new NullPointerException("loggingClass == null");
    return new Builder(Logger.getLogger(loggingClass.getName()));
  }
797786
@Nonnull
	public static <T> ObjIntConsumer<T> objIntConsumerFrom(Consumer<ObjIntConsumerBuilder<T>> buildingFunction) {
		ObjIntConsumerBuilder builder = new ObjIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1281469
public static <E> JpaRepositoryConfig.Builder<E> builder(Class<E> entityClass) {
        JpaRepositoryConfig.Builder<E> builder = new JpaRepositoryConfig.Builder<>();
        builder.entityClass = entityClass;
        builder.resourceClass = entityClass;
        return builder;
    }
585550
public static void buildFieldProperties(final Class<?> aClass, final DescriptionBuilder builder) {
        for (final Field field : collectClassFields(aClass)) {
            final PluginProperty annotation = field.getAnnotation(PluginProperty.class);
            if (null == annotation) {
                continue;
            }
            final Property pbuild = propertyFromField(field, annotation);
            if (null == pbuild) {
                continue;
            }
            builder.property(pbuild);
        }
    }
797348
public static <K, V> MapBuilder<K, V> builder(Map<K, V> map) {
		return new MapBuilder<>(map);
	}
1127206
@Nonnull
	public static <T1, T2> LBiObjDblPredicate<T1, T2> biObjDblPredicateFrom(Consumer<LBiObjDblPredicateBuilder<T1, T2>> buildingFunction) {
		LBiObjDblPredicateBuilder builder = new LBiObjDblPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
582591
@Nonnull
	public static <T1, T2, R> LBiObjFltFunction<T1, T2, R> biObjFltFunctionFrom(Consumer<LBiObjFltFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjFltFunctionBuilder builder = new LBiObjFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1096919
protected function compilePropertyDefinitions(ClassBuilder $builder, StreamWriter $writer)
    {
        foreach ($builder->getProperties() as $property) {
            /* @var PropertyBuilder $property */

            $writer->indent()->writeLine('/**');
            $comments = $property->getComments();
            if (count($comments)) {
                foreach ($comments as $comment) {
                    $comment = trim(ltrim($comment, '>'));
                    $writer->indent()->write(' * ')->writeLine($comment);
                }
                $writer->indent()
                    ->write(' * ')
                    ->writeLine();
            }
            $writer->indent()->write(' * @var');
            if ($type = $property->getType()) {
                $writer->write(' ' . $property->getType());
            }
            $writer->write(' $' . $property->getName())
                ->writeLine()
                ->indent()->writeLine(' */');

            $writer->indent()
                ->write($property->getVisibility())
                ->write(' ')
                ->writeLine('$'.$property->getName().';')
                ->writeLine();
        }

        $writer->writeLine();
    }
629206
@CheckReturnValue
    protected Builder build(Object object) {
        if (object instanceof Concept) {
            return concept((Concept) object);
        }
        else if (object instanceof Boolean) {
            return bool((boolean) object);
        }
        else if (object instanceof Collection) {
            return collection((Collection<?>) object);
        }
        else if (object instanceof AnswerGroup<?>) {
            return answerGroup((AnswerGroup<?>) object);
        }
        else if (object instanceof ConceptList) {
            return conceptList((ConceptList) object);
        }
        else if (object instanceof ConceptMap) {
            return conceptMap((ConceptMap) object);
        }
        else if (object instanceof ConceptSet) {
            if (object instanceof ConceptSetMeasure) {
                return conceptSetMeasure((ConceptSetMeasure) object);
            }
            else {
                return conceptSet((ConceptSet) object);
            }
        }
        else if (object instanceof Numeric) {
            return value((Numeric) object);
        }
        else if (object instanceof Map) {
            return map((Map<?, ?>) object);
        }
        else {
            return object(object);
        }
    }
1091198
public static DocumentBuilder createDocumentBuilder()
	{
		try
		{
			DocumentBuilderFactory factory = DOCUMENT_BUILDER_FACTORY.get();

			if (factory == null)
			{
				factory = createDocumentBuilderFactory();

				DOCUMENT_BUILDER_FACTORY = new SoftReference<>(factory);
			}

			return factory.newDocumentBuilder();
		}
		catch (ParserConfigurationException e)
		{
			throw new RuntimeException("Error creating DocumentBuilder: " + e.getMessage(), e);
		}
	}
378402
@Override
    public synchronized Builder create(String builderConfigId) throws InvalidBuilderException {
        if (builderConfigId == null || builderConfigId.isEmpty()) {
            String err = Tr.formatMessage(tc, "JWT_BUILDER_INVALID", new Object[] { builderConfigId });
            throw new InvalidBuilderException(err);
        }
        if (!active) {
            String err = Tr.formatMessage(tc, "JWT_BUILDER_NOT_ACTIVE", new Object[] { builderConfigId });
            throw new InvalidBuilderException(err);
        }

        // Tr.error(tc, "JWT_BUILDER_NOT_ACTIVE", new Object[] { builderConfigId
        // });
        // return null;
        return new BuilderImpl(builderConfigId);
    }
482762
public static AnnotationTypeBuilder getInstance(Context context,
            AnnotationTypeDoc annotationTypeDoc,
            AnnotationTypeWriter writer)
            throws Exception {
        return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);
    }
481339
public static Builder set(String field, Object value) {
        return new Builder().set(field, value);
    }
611606
def build(self, builder):
        
        params = {}

        # Add in the transaction type
        if self.transaction_type is not None:
            params["TransactionType"] = self.transaction_type

        if self.seqnum is None:
            # SeqNum is not optional (and defaulted)
            raise ValueError("SeqNum is not set.")  # pragma: no cover
        params["SeqNum"] = str(self.seqnum)

        if self.annotation_id is not None:
            # If an Annotation is contained with an Annotations element,
            # the ID attribute is required.
            params["ID"] = self.annotation_id

        builder.start("Annotation", params)

        if self.flags in (None, []):
            raise ValueError('Flag is not set.')

        # populate the flags
        for flag in self.flags:
            flag.build(builder)

        # add the Comment, if it exists
        if self.comment is not None:
            self.comment.build(builder)

        builder.end("Annotation")
749599
@Beta
  public Builder toBuilder() {
    Builder builder = new GoogleCredential.Builder()
        .setServiceAccountPrivateKey(serviceAccountPrivateKey)
        .setServiceAccountPrivateKeyId(serviceAccountPrivateKeyId)
        .setServiceAccountId(serviceAccountId)
        .setServiceAccountProjectId(serviceAccountProjectId)
        .setServiceAccountUser(serviceAccountUser)
        .setServiceAccountScopes(serviceAccountScopes)
        .setTokenServerEncodedUrl(getTokenServerEncodedUrl())
        .setTransport(getTransport())
        .setJsonFactory(getJsonFactory())
        .setClock(getClock());

    builder.setClientAuthentication(getClientAuthentication());

    return builder;
  }