Lines Matching defs:cst
811 * @param cst the value of the constant to be added to the constant pool.
817 Item newConstItem(final Object cst) {
818 if (cst instanceof Integer) {
819 int val = ((Integer) cst).intValue();
821 } else if (cst instanceof Byte) {
822 int val = ((Byte) cst).intValue();
824 } else if (cst instanceof Character) {
825 int val = ((Character) cst).charValue();
827 } else if (cst instanceof Short) {
828 int val = ((Short) cst).intValue();
830 } else if (cst instanceof Boolean) {
831 int val = ((Boolean) cst).booleanValue() ? 1 : 0;
833 } else if (cst instanceof Float) {
834 float val = ((Float) cst).floatValue();
836 } else if (cst instanceof Long) {
837 long val = ((Long) cst).longValue();
839 } else if (cst instanceof Double) {
840 double val = ((Double) cst).doubleValue();
842 } else if (cst instanceof String) {
843 return newString((String) cst);
844 } else if (cst instanceof Type) {
845 Type t = (Type) cst;
850 throw new IllegalArgumentException("value " + cst);
860 * @param cst the value of the constant to be added to the constant pool.
866 public int newConst(final Object cst) {
867 return newConstItem(cst).index;