类com.sun.tools.javac.util.ArrayUtils源码实例Demo

下面列出了怎么用com.sun.tools.javac.util.ArrayUtils的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: TencentKona-8   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码2 项目: jdk8u60   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码3 项目: openjdk-jdk8u   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码4 项目: lua-for-android   文件: Pool.java
/** Place an object in the pool, unless it is already there.
 *  If object is a symbol also enter its owner unless the owner is a
 *  package.  Return the object's index in the pool.
 */
public int put(Object value) {
    value = makePoolValue(value);
    Assert.check(!(value instanceof Type.TypeVar));
    Assert.check(!(value instanceof Types.UniqueType &&
                   ((UniqueType) value).type instanceof Type.TypeVar));
    Integer index = indices.get(value);
    if (index == null) {
        index = pp;
        indices.put(value, index);
        pool = ArrayUtils.ensureCapacity(pool, pp);
        pool[pp++] = value;
        if (value instanceof Long || value instanceof Double) {
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = null;
        }
    }
    return index.intValue();
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码6 项目: openjdk-jdk9   文件: Pool.java
/** Place an object in the pool, unless it is already there.
 *  If object is a symbol also enter its owner unless the owner is a
 *  package.  Return the object's index in the pool.
 */
public int put(Object value) {
    value = makePoolValue(value);
    Assert.check(!(value instanceof Type.TypeVar));
    Assert.check(!(value instanceof Types.UniqueType &&
                   ((UniqueType) value).type instanceof Type.TypeVar));
    Integer index = indices.get(value);
    if (index == null) {
        index = pp;
        indices.put(value, index);
        pool = ArrayUtils.ensureCapacity(pool, pp);
        pool[pp++] = value;
        if (value instanceof Long || value instanceof Double) {
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = null;
        }
    }
    return index.intValue();
}
 
源代码7 项目: hottub   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码8 项目: openjdk-8-source   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码9 项目: openjdk-8   文件: Pool.java
/** Place an object in the pool, unless it is already there.
     *  If object is a symbol also enter its owner unless the owner is a
     *  package.  Return the object's index in the pool.
     */
    public int put(Object value) {
        value = makePoolValue(value);
//      assert !(value instanceof Type.TypeVar);
        Integer index = indices.get(value);
        if (index == null) {
//          System.err.println("put " + value + " " + value.getClass());//DEBUG
            index = pp;
            indices.put(value, index);
            pool = ArrayUtils.ensureCapacity(pool, pp);
            pool[pp++] = value;
            if (value instanceof Long || value instanceof Double) {
                pool = ArrayUtils.ensureCapacity(pool, pp);
                pool[pp++] = null;
            }
        }
        return index.intValue();
    }
 
源代码10 项目: TencentKona-8   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码11 项目: jdk8u60   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码12 项目: openjdk-jdk8u   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码13 项目: lua-for-android   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码14 项目: lua-for-android   文件: Flow.java
/** Initialize new trackable variable by setting its address field
 *  to the next available sequence number and entering it under that
 *  index into the vars array.
 */
void newVar(JCVariableDecl varDecl) {
    VarSymbol sym = varDecl.sym;
    vardecls = ArrayUtils.ensureCapacity(vardecls, nextadr);
    if ((sym.flags() & FINAL) == 0) {
        sym.flags_field |= EFFECTIVELY_FINAL;
    }
    sym.adr = nextadr;
    vardecls[nextadr] = varDecl;
    inits.excl(nextadr);
    uninits.incl(nextadr);
    nextadr++;
}
 
源代码15 项目: openjdk-jdk8u-backup   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码16 项目: openjdk-jdk9   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码17 项目: hottub   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码18 项目: openjdk-8-source   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
源代码19 项目: openjdk-8   文件: UnicodeReader.java
/** Append a character to sbuf.
 */
protected void putChar(char ch, boolean scan) {
    sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
    sbuf[sp++] = ch;
    if (scan)
        scanChar();
}
 
 类所在包
 类方法
 同包方法