Create a {@code TypeAnnotationPosition} for a type cast.

@param location The type path.
@param type_index The index into an intersection type.
974084
public static TypeAnnotationPosition
        typeCast(final List<TypePathEntry> location,
                 final int type_index) {
        return typeCast(location, null, type_index, -1);
    }
28207
public static TypeAnnotationPosition
        methodTypeParameter(final List<TypePathEntry> location,
                            final int parameter_index) {
        return methodTypeParameter(location, null, parameter_index, -1);
    }
764815
public void enterTypeAnnotations(List<JCAnnotation> annotations, Env<AttrContext> env,
            Symbol s, DiagnosticPosition deferPos, boolean isTypeParam)
    {
        Assert.checkNonNull(s, "Symbol argument to actualEnterTypeAnnotations is nul/");
        JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
        DiagnosticPosition prevLintPos = null;

        if (deferPos != null) {
            prevLintPos = deferredLintHandler.setPos(deferPos);
        }
        try {
            annotateNow(s, annotations, env, true, isTypeParam);
        } finally {
            if (prevLintPos != null)
                deferredLintHandler.setPos(prevLintPos);
            log.useSource(prev);
        }
    }
54165
public function addIndex($type, $index)
    {
        if (!isset($this->indexes[$type])) {
            $this->indexes[$type] = [];
        }

        $this->indexes[$type][] = $index;
    }
546192
protected void putMembersInIndexMap(TypeElement te) {
        adjustIndexMap(utils.getAnnotationFields(te));
        adjustIndexMap(utils.getFields(te));
        adjustIndexMap(utils.getMethods(te));
        adjustIndexMap(utils.getConstructors(te));
        adjustIndexMap(utils.getEnumConstants(te));
    }
1308855
public static TypeAnnotationPosition
        constructorInvocationTypeArg(final List<TypePathEntry> location,
                                     final int type_index) {
        return constructorInvocationTypeArg(location, null, type_index, -1);
    }
727236
private static Feature createLocation(final Point point,
            final LocationType locationType) {
        final Feature location = new Feature();
        location.setGeometry(point);
        location.setProperty("locationType", locationType);
        location.setId("location");
        return location;
    }
775739
public static <T> Position.Writable<T> writable(final Type type) {
        return writable(type, noop());
    }
1345551
public function searchIn($index, $type = null)
	{
		// Reset the current state, in case the same instance is re-used.
		$this->indices = [];
		$this->types = [];

		$this->searchInIndices((array) $index);

		if ($type !== null) {
			$this->searchInTypes((array) $type);
		}
	}
1085886
private static void createTypeWithMappingInElasticsearch(RestHighLevelClient client, String index, String mapping)
            throws Exception {
        logger.trace("createTypeWithMappingInElasticsearch([{}])", index);

        assert client != null;
        assert index != null;

        if (mapping != null) {
            // Create mapping
            client.indices().putMapping(new PutMappingRequest(index).source(mapping, XContentType.JSON), RequestOptions.DEFAULT);
        } else {
            logger.trace("no content given for mapping. Ignoring mapping creation in index [{}].", index);
        }

        logger.trace("/createTypeWithMappingInElasticsearch([{}])", index);
    }
117283
public <T> Local<T> getParameter(int index, TypeId<T> type) {
        if (thisLocal != null) {
            index++; // adjust for the hidden 'this' parameter
        }
        return coerce(parameters.get(index), type);
    }
125752
public <T> Local<T> newLocal(TypeId<T> type) {
        if (localsInitialized) {
            throw new IllegalStateException("Cannot allocate locals after adding instructions");
        }
        Local<T> result = Local.get(this, type);
        locals.add(result);
        return result;
    }
255092
public static Type getTypeArgument(Type type, int index) {
		final Type[] typeArguments = getTypeArguments(type);
		if (null != typeArguments && typeArguments.length > index) {
			return typeArguments[index];
		}
		return null;
	}
1333583
public static TypeAnnotationPosition
        field(final List<TypePathEntry> location,
              final JCLambda onLambda,
              final int pos) {
        return new TypeAnnotationPosition(TargetType.FIELD, pos,
                                          Integer.MIN_VALUE, onLambda,
                                          Integer.MIN_VALUE, Integer.MIN_VALUE,
                                          location);
    }
1040564
@SuppressWarnings( "unchecked" )
    protected void processModifiersOfTypeDeclaration( AbstractTypeDeclaration typeDeclaration,
                                                      TypeMetadata classMetadata ) {
        List<IExtendedModifier> modifiers = typeDeclaration.modifiers();

        for (IExtendedModifier extendedModifier : modifiers) {
            if (extendedModifier.isAnnotation()) {
                if (extendedModifier instanceof MarkerAnnotation) {
                    MarkerAnnotation marker = (MarkerAnnotation)extendedModifier;
                    classMetadata.getAnnotations().add(AnnotationMetadata.markerAnnotation(JavaMetadataUtil.getName(marker.getTypeName())));
                }
            } else {
                Modifier modifier = (Modifier)extendedModifier;
                classMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
            }
        }
    }
709861
public static TypeAnnotationPosition
        methodThrows(final List<TypePathEntry> location,
                     final JCLambda onLambda,
                     final int type_index,
                     final int pos) {
        return new TypeAnnotationPosition(TargetType.THROWS, pos,
                                          Integer.MIN_VALUE, onLambda,
                                          type_index, Integer.MIN_VALUE,
                                          location);
    }
1298217
@Override
    public JavaClassBuilderAt at(TypeReferenceLocation... locations)
    {
        if (locations != null)
            this.locations = Arrays.asList(locations);
        return this;
    }