Package sk.antons.json.literal.impl
Class JsonLiteralImpl
java.lang.Object
sk.antons.json.impl.JsonValueImpl
sk.antons.json.literal.impl.JsonLiteralImpl
- All Implemented Interfaces:
JsonMember,JsonValue,JsonLiteral
- Direct Known Subclasses:
JsonBoolLiteralImpl,JsonExpLiteralImpl,JsonFracLiteralImpl,JsonIntLiteralImpl,JsonNullLiteralImpl,JsonStringLiteralImpl
- Author:
- antons
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class sk.antons.json.impl.JsonValueImpl
group -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJsonLiteralImpl(String literal) protectedJsonLiteralImpl(String literal, int offset, int length) -
Method Summary
Modifier and TypeMethodDescriptionvoidfindFirst(PathMatcher matcher, List<String> path) static JsonLiteralImplliteral()String representing literal.voidremove()Removes this instance from parent object.String value of this literal.protected voidprotected voidtoPrettyString(Appendable sb, String prefix, String indent) abstract JsonLiteralImpl.Typetype()Methods inherited from class sk.antons.json.impl.JsonValueImpl
asArray, asBoolLiteral, asExpLiteral, asFracLiteral, asIntLiteral, asLiteral, asNullLiteral, asObject, asStringLiteral, find, find, findAll, findAllLiterals, findFirst, findFirstLiteral, group, isArray, isBoolLiteral, isDescendantOf, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, name, parent, parentIndex, path, pathAsString, replaceBy, setGroup, toCompactString, toPrettyString, writeCompact, writePrettyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sk.antons.json.JsonValue
asArray, asBoolLiteral, asExpLiteral, asFracLiteral, asIntLiteral, asLiteral, asNullLiteral, asObject, asStringLiteral, asTemplateParam, copy, find, find, findAll, findAllLiterals, findFirst, findFirstLiteral, isArray, isBoolLiteral, isDescendantOf, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, name, parent, parentIndex, path, pathAsString, replaceBy, toCompactString, toPrettyString, writeCompact, writePretty
-
Field Details
-
literal
-
offset
protected int offset -
length
protected int length -
cachedValueString
-
-
Constructor Details
-
JsonLiteralImpl
-
JsonLiteralImpl
-
-
Method Details
-
type
-
instance
-
literal
Description copied from interface:JsonLiteralString representing literal. ("foo", 123, true, null, 12.3....)- Specified by:
literalin interfaceJsonLiteral- Returns:
- literal string
-
stringValue
Description copied from interface:JsonLiteralString value of this literal. (for string literal "foo" it returns foo)- Specified by:
stringValuein interfaceJsonLiteral- Returns:
- string value of this literal
-
toCompactString
- Specified by:
toCompactStringin classJsonValueImpl
-
toPrettyString
- Specified by:
toPrettyStringin classJsonValueImpl
-
findFirst
- Specified by:
findFirstin classJsonValueImpl
-
findAll
- Specified by:
findAllin classJsonValueImpl
-
remove
public void remove()Description copied from interface:JsonValueRemoves this instance from parent object.- Specified by:
removein interfaceJsonValue- Overrides:
removein classJsonValueImpl
-