Home
last modified time | relevance | path

Searched refs:literal (Results 1 – 4 of 4) sorted by relevance

/libcore/json/src/main/java/org/json/
DJSONTokener.java281 String literal = nextToInternal("{}[]/\\:,=;# \t\f"); in readLiteral() local
283 if (literal.length() == 0) { in readLiteral()
285 } else if ("null".equalsIgnoreCase(literal)) { in readLiteral()
287 } else if ("true".equalsIgnoreCase(literal)) { in readLiteral()
289 } else if ("false".equalsIgnoreCase(literal)) { in readLiteral()
294 if (literal.indexOf('.') == -1) { in readLiteral()
296 String number = literal; in readLiteral()
322 return Double.valueOf(literal); in readLiteral()
327 return new String(literal); // a new string avoids leaking memory in readLiteral()
/libcore/luni/src/test/java/dalvik/system/
DJniTest.java97 for(Object literal : literals) { in testPassingObjectReferences()
99 a[i] = literal; in testPassingObjectReferences()
125 for(boolean literal : literals) { in testPassingBooleans()
127 a[i] = literal; in testPassingBooleans()
156 for(char literal : literals) { in testPassingChars()
158 a[i] = literal; in testPassingChars()
184 for(byte literal : literals) { in testPassingBytes()
186 a[i] = literal; in testPassingBytes()
212 for(short literal : literals) { in testPassingShorts()
214 a[i] = literal; in testPassingShorts()
[all …]
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java1290 public DateTimeFormatterBuilder appendLiteral(char literal) { in appendLiteral() argument
1291 appendInternal(new CharLiteralPrinterParser(literal)); in appendLiteral()
1305 public DateTimeFormatterBuilder appendLiteral(String literal) { in appendLiteral() argument
1306 Objects.requireNonNull(literal, "literal"); in appendLiteral()
1307 if (literal.length() > 0) { in appendLiteral()
1308 if (literal.length() == 1) { in appendLiteral()
1309 appendInternal(new CharLiteralPrinterParser(literal.charAt(0))); in appendLiteral()
1311 appendInternal(new StringLiteralPrinterParser(literal)); in appendLiteral()
2382 private final char literal; field in DateTimeFormatterBuilder.CharLiteralPrinterParser
2384 CharLiteralPrinterParser(char literal) { in CharLiteralPrinterParser() argument
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DStringTest.java181 String literal = (String) Class.forName("libcore.java.lang.StringTest$HasLiteral") in testInternBeforeLiteralIsLoaded() local
183 assertEquals(System.identityHashCode(programmatic), System.identityHashCode(literal)); in testInternBeforeLiteralIsLoaded()
184 assertSame(programmatic, literal); in testInternBeforeLiteralIsLoaded()
188 static String literal = "[5058, 9962, 1563, 5744]"; field in StringTest.HasLiteral