Creates a new key of the specified name and type.

@see #stringKey(String)
@see #integerKey(String)
@see #booleanKey(String)
320459
@NotNull
    public static <T> Key<T> create(@NotNull String name, @NotNull Class<T> type) {
        return new Key<>(name, type);
    }
1346432
private KeyHook create(KeyBinding key)
    {
        if (key != null && key instanceof KeyHook)
        {
            return (KeyHook)key; // Don't create a KeyHook to replace this KeyBinding, since that has already been done at some point.
            // (Minecraft keeps a pointer to every KeyBinding that gets created, and they never get destroyed - so we don't want to create
            // any more than necessary.)
        }
        return new KeyHook(key.getKeyDescription(), key.getKeyCode(), key.getKeyCategory());
    }
171210
public NameAndTypeConstant addNameAndType(String name, String type)
  {
    NameAndTypeConstant entry = getNameAndType(name, type);

    if (entry != null)
      return entry;

    Utf8Constant nameEntry = addUTF8(name);
    Utf8Constant typeEntry = addUTF8(type);

    entry = new NameAndTypeConstant(this, _entries.size(),
                                    nameEntry.getIndex(),
                                    typeEntry.getIndex());

    addConstant(entry);

    return entry;
  }
1331093
public static KeySpec newPBEKeySpec(final String privateKey)
	{
		if (privateKey == null)
		{
			return new PBEKeySpec(CompoundAlgorithm.PRIVATE_KEY.toCharArray());
		}
		return new PBEKeySpec(privateKey.toCharArray());
	}
1046418
public MethodKey createCopy() {
        int size = getParameterCount();
        Class[] paramTypes = new Class[size];
        for (int i = 0; i < size; i++) {
            paramTypes[i] = getParameterType(i);
        }
        return new DefaultMethodKey(sender, name, paramTypes, isCallToSuper);
    }
87677
public static <A> AttributeKey<A> createKey(
        String name,
        Class<A> type
    ) {

        return PredefinedKey.valueOf(name, type);

    }
637029
public static Object newInstance(String name) {
        try {
            return forName(name).newInstance();
        } catch (InstantiationException e) {
            throw new IllegalStateException(e.getMessage(), e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
718038
HsqlName newAutoName(String prefix, String namepart, HsqlName schema,
                         HsqlName parent, int type) {

        StringBuffer sb = new StringBuffer();

        if (prefix != null) {
            if (prefix.length() != 0) {
                sb.append("SYS_");
                sb.append(prefix);
                sb.append('_');

                if (namepart != null) {
                    sb.append(namepart);
                    sb.append('_');
                }

                sb.append(++sysNumber);
            }
        } else {
            sb.append(namepart);
        }

        HsqlName name = new HsqlName(this, sb.toString(), type, false);

        name.schema = schema;
        name.parent = parent;

        return name;
    }
102493
private static Node createNewObjectPatternFromSuccessiveKeys(Node stringKey) {
    Node newPattern = stringKey.getParent().cloneNode(); // copies the JSType
    for (Node next = stringKey.getNext(); next != null; ) {
      Node newKey = next;
      next = newKey.getNext();
      newPattern.addChildToBack(newKey.detach());
    }
    return newPattern;
  }
965937
def new_key(self, key_name=None, key_type=Key.KEY_REGULAR_FILE):
        
        if key_name == '-':
            return Key(self.name, '-', key_type=Key.KEY_STREAM_WRITABLE)
        else:
            dir_name = os.path.dirname(key_name)
            if dir_name and not os.path.exists(dir_name):
                os.makedirs(dir_name)
            fp = open(key_name, 'wb')
            return Key(self.name, key_name, fp)
919388
@NonNull
  public static CreateTypeStart createType(
      @Nullable CqlIdentifier keyspace, @NonNull CqlIdentifier typeName) {
    return new DefaultCreateType(keyspace, typeName);
  }
1225334
public JSONStringer key(String name) throws JSONException {
		if (name == null) {
			throw new JSONException("Names must be non-null");
		}
		beforeKey();
		string(name);
		return this;
	}
177729
public GitlabSSHKey createSSHKey(String title, String key) throws IOException {

        Query query = new Query()
                .append("title", title)
                .append("key", key);

        String tailUrl = GitlabUser.USER_URL + GitlabSSHKey.KEYS_URL + query.toString();

        return dispatch().to(tailUrl, GitlabSSHKey.class);
    }
1324697
@NotNull
    public static Key<Boolean> booleanKey(@NotNull String name) {
        return create(name, Boolean.class);
    }
526887
public static <T> Key<T> of(Class<T> type,
                              Annotation ann)
  {
    Objects.requireNonNull(type);
    Objects.requireNonNull(ann);

    return new Key<>(type, new Annotation[] { ann });
  }
667937
public static <T> NamedAttributeType<T> newNamedTypeOf(final String name, final Class<T> type) {
	return new NamedAttributeType<>(name, newTypeOf(type));
    }
1171310
public void addForeigerKey(String key) {
    String[] foreigers = new String[foreigerKeys.length + 1];
    int i = 0;
    for (; i < foreigerKeys.length; i++) {
      foreigers[i] = foreigerKeys[i];
    }
    foreigers[i] = key;
    foreigerKeys = foreigers;
  }