Creates a new {@link FieldInfo} with the specified {@code name} and {@link TypeSignature}.
The {@link FieldLocation} and {@link FieldRequirement} of the {@link FieldInfo} will be
{@code UNSPECIFIED}.
490387
public static FieldInfo of(String name, TypeSignature typeSignature) {
        return new FieldInfo(name, FieldLocation.UNSPECIFIED, FieldRequirement.UNSPECIFIED, typeSignature,
                             ImmutableList.of(), null);
    }
100741
public static Requirement newInstance(String name)
    {
        Requirement requirement = new Requirement();
        requirement.setName(name);
        return requirement;
    }
850033
private NameInfo getNameInfoForName(String name, SymbolType type) {
    Map<String, NameInfo> map = type == PROPERTY ? propertyNameInfo : varNameInfo;
    if (map.containsKey(name)) {
      return map.get(name);
    } else {
      NameInfo nameInfo = new NameInfo(name);
      map.put(name, nameInfo);
      symbolGraph.createNode(nameInfo);
      return nameInfo;
    }
  }
141920
public ISarlFieldBuilder addVarSarlField(String name) {
		ISarlFieldBuilder builder = this.iSarlFieldBuilderProvider.get();
		builder.eInit(getSarlBehavior(), name, "var", getTypeResolutionContext());
		return builder;
	}
890318
public static Parameter createParameter(Type type, String name) {
        return new Parameter(type, new VariableDeclaratorId(name));
    }
653764
public FieldReaderWriter locateField(String name) {
		if (hasFieldChangedInHierarchy(name)) {
			return walk(name, getLatestTypeDescriptor());
		}
		else {
			return getFieldInHierarchy(name);
		}
	}
336946
public void addFieldInfo (@Nonnull @Nonempty final String sFieldName, @Nonnull @Nonempty final String sText)
  {
    add (SingleError.builderInfo ().setErrorFieldName (sFieldName).setErrorText (sText).build ());
  }
1053965
static synchronized FieldPropertyInfo fieldPropertyFor(Class<?> type, Field field,
      Configuration configuration, String name) {
    PropertyInfoKey key = new PropertyInfoKey(type, name, configuration);
    FieldPropertyInfo fieldPropertyInfo = FIELD_CACHE.get(key);
    if (fieldPropertyInfo == null) {
      fieldPropertyInfo = new FieldPropertyInfo(type, field, name);
      FIELD_CACHE.put(key, fieldPropertyInfo);
    }

    return fieldPropertyInfo;
  }
632955
public static HeaderTypes create(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("header name may not be null");
        }
        String type = name.trim().toLowerCase(Locale.ENGLISH);
        if (type.length() == 0) {
            throw new IllegalArgumentException("header name may not be empty");
        }
        return new HeaderTypes(name);
    }
998878
public void assignDefault(String name) throws IOException
    {
        if (hasLocalVariable(name))
        {
            TypeMirror t = getLocalType(name);
            if (Typ.isPrimitive(t))
            {
                tconst(t, 0);
            }
            else
            {
                aconst_null();
            }
            tstore(name);
        }
        else
        {
            VariableElement field = El.getField(subClass, name);
            if (field == null)
            {
                throw new IllegalArgumentException("field "+name+" not found");
            }
            aload(0);
            TypeMirror t = field.asType();
            if (Typ.isPrimitive(t))
            {
                tconst(t, 0);
            }
            else
            {
                aconst_null();
            }
            putField(name);
        }
    }
1150904
public Field field(String name) {
    for (Field field : declaredFields) {
      if (field.name().equals(name)) {
        return field;
      }
    }
    for (OneOf oneOf : oneOfs) {
      for (Field field : oneOf.fields()) {
        if (field.name().equals(name)) {
          return field;
        }
      }
    }
    return null;
  }
547684
@SuppressWarnings({ "rawtypes", "unchecked", "deprecation" })
    protected TypeInformation<?> createInfo(Type fieldType) {

        if (fieldType.equals(this.type)) {
            return this;
        }

        if (fieldType instanceof Class) {
            return new ClassTypeInformation((Class<?>) fieldType);
        }

        Class<S> resolveType = resolveClass(fieldType);
        Map<TypeVariable, Type> variableMap = new HashMap<TypeVariable, Type>();
        variableMap.putAll(GenericTypeResolver.getTypeVariableMap(resolveType));

        if (fieldType instanceof ParameterizedType) {

            ParameterizedType parameterizedType = (ParameterizedType) fieldType;

            TypeVariable<Class<S>>[] typeParameters = resolveType.getTypeParameters();
            Type[] arguments = parameterizedType.getActualTypeArguments();

            for (int i = 0; i < typeParameters.length; i++) {
                variableMap.put(typeParameters[i], arguments[i]);
            }

            return new ParametrizedTypeInformation(parameterizedType, this, variableMap);
        }

        if (fieldType instanceof TypeVariable) {
            TypeVariable<?> variable = (TypeVariable<?>) fieldType;
            return new TypeVariableTypeInformation(variable, type, this, variableMap);
        }

        if (fieldType instanceof GenericArrayType) {
            return new GenericArrayTypeInformation((GenericArrayType) fieldType, this, variableMap);
        }

        if (fieldType instanceof WildcardType) {

            WildcardType wildcardType = (WildcardType) fieldType;
            return new WildcardTypeInformation(wildcardType, variableMap);
        }

        throw new IllegalArgumentException();
    }
136350
public void addField(int access, String name, String desc, String signature) {

    if (((access & Opcodes.ACC_PUBLIC) != 0)) {
      if (fields == null) {
        fields = new ArrayList<>();
      }
      if ((access & Opcodes.ACC_STATIC) == 0) {
        fields.add(new FieldInfo(this, name, desc, signature));
      }
    }
  }
757688
public static <F extends PField> MappedField<F> withColumn(String name, F field) {
        return new MappedField<>(name, field);
    }
823853
public static ColumnInformation create(String name, ColumnType type) {
    byte[] nameBytes = name.getBytes();

    byte[] arr = new byte[23 + 2 * nameBytes.length];
    int pos = 0;

    //lenenc_str     catalog
    //lenenc_str     schema
    //lenenc_str     table
    //lenenc_str     org_table
    for (int i = 0; i < 4; i++) {
      arr[pos++] = 1;
      arr[pos++] = 0;
    }

    //lenenc_str     name
    //lenenc_str     org_name
    for (int i = 0; i < 2; i++) {
      arr[pos++] = (byte) name.length();
      System.arraycopy(nameBytes, 0, arr, pos, nameBytes.length);
      pos += nameBytes.length;
    }

    //lenenc_int     length of fixed-length fields [0c]
    arr[pos++] = 0xc;

    //2              character set
    arr[pos++] = 33; /* charset  = UTF8 */
    arr[pos++] = 0;

    int len;

    /* Sensible predefined length - since we're dealing with I_S here, most char fields are 64 char long */
    switch (type.getSqlType()) {
      case Types.VARCHAR:
      case Types.CHAR:
        len = 64 * 3; /* 3 bytes per UTF8 char */
        break;
      case Types.SMALLINT:
        len = 5;
        break;
      case Types.NULL:
        len = 0;
        break;
      default:
        len = 1;
        break;
    }

    //
    arr[pos] = (byte) len; /* 4 bytes : column length */
    pos += 4;

    arr[pos++] = (byte) ColumnType.toServer(type.getSqlType()).getType(); /* 1 byte : type */

    arr[pos++] = (byte) len; /* 2 bytes : flags */
    arr[pos++] = 0;

    arr[pos++] = 0; /* decimals */

    arr[pos++] = 0; /* 2 bytes filler */
    arr[pos] = 0;

    return new ColumnInformation(new Buffer(arr));
  }
789462
private PublishedCustomer createCustomer(final String name, ExecutionContext executionContext) {
        return executionContext.add(this, publishedCustomers.create(name));
    }
136609
@Nullable
	private FieldAnnotation getFieldAnnotation(final String fieldName) {
		JavaClass cls = getClassContext().getJavaClass();
		Field[] fields = cls.getFields();
		for (Field f : fields) {
			if (f.getName().equals(fieldName)) {
				return new FieldAnnotation(cls.getClassName(), fieldName, f.getSignature(), f.isStatic());
			}
		}
		return null; // shouldn't happen
	}