/*
(non-Javadoc)

@see java.text.Format#parseObject(java.lang.String)
545908
public Object parseObject(String source) throws ParseException
    {

        ParsePosition pos = new ParsePosition(0);
        Object result = parseObject(source, pos);
        if (pos.getErrorIndex() >= 0)
        {
            throw new ParseException("Format.parseObject(String) failed", pos.getErrorIndex());
        }
        return result;
    }
1140778
private void readObject(java.io.ObjectInputStream objectInputStream)
                    throws java.io.IOException
                    , java.lang.ClassNotFoundException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "readObject",
                        "ObjectInputStream="
                                        + objectInputStream);

        // Super class already handled by serilaization.
        objectInputStream.defaultReadObject();

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "readObject"
                       , "via UnsupportedOperationException");
        throw new UnsupportedOperationException();
    }
258847
@Override
    public Object getObject( final String    key )
        throws
            UtilException
    {
        return formatObject( key, getRequiredPropValue( key ) );
    }
58314
private Object parseFileParameter(final String serializedObject) {
        final File res = new File(serializedObject);
        if (!res.exists()) {
            throw new CoreRuntimeException("Impossible to load file " + serializedObject);
        }
        return res;
    }
922348
public void readObject(java.io.DataInputStream dataInputStream,
                           ObjectManagerState objectManagerState)
                    throws ObjectManagerException {
        final String methodName = "readObject";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { dataInputStream, objectManagerState });

        try {
            byte version = dataInputStream.readByte();
            if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                trace.debug(this, cclass,
                            methodName,
                            "version=" + version + "(byte)");

            identifier = dataInputStream.readLong();
            int XIDLength = dataInputStream.readUnsignedByte();
            if (XIDLength > 0)
            {
                XID = new byte[XIDLength];
                dataInputStream.read(XID);
            } // if (XIDLength > 0).

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:217:1.9");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass,
                           methodName,
                           "via PermanentIOException");
            throw new PermanentIOException(this,
                                           exception);
        } // catch (java.io.IOException exception).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       methodName);
    }
1261761
@Override
    public Object parse(IGroup group, JsonRuleParser parser) {
        StringBuffer operate = new StringBuffer();

        // NOT
        if (group.getNot() != null && group.getNot()) {
            operate.append("( NOT ");
        }

        if (group.getRules().size() > 0) {
            operate.append("( ");
        }

        // rules
        List<Object> params = new ArrayList<Object>();
        for (int i = 0; i < group.getRules().size(); i++) {
            // json parse
            Operation operation = (Operation) parser.parse(group.getRules().get(i));

            // operate
            operate.append(operation.getOperate());
            if (i < group.getRules().size() - 1) {
                operate.append(EnumCondition.AND.equals(group.getCondition()) ? " AND " : " OR ");
            }
            // params
            if (operation.getHasValue()) {
                if (operation.getValue() instanceof List) {
                    params.addAll((Collection<?>) operation.getValue());
                } else {
                    params.add(operation.getValue());
                }
            }
        }

        if (group.getRules().size() > 0) {
            operate.append(" )");
        }
        if (group.getNot() != null && group.getNot()) {
            operate.append(" )");
        }

        return new Operation(operate, params);
    }
1131880
private void readObject(ObjectInputStream in) throws ClassNotFoundException, NoSuchMethodException, IOException {
        result = ClassRef.read(in);
        arg = ClassRef.read(in);
        name = in.readUTF();
    }
241433
private void readObject(java.io.ObjectInputStream s)
        throws java.io.IOException, ClassNotFoundException {

        // Read in all fields
        s.defaultReadObject();
        compile();
    }
778015
@Override
	public IGPSObject parse(final JSONObject json) throws ParseException {
		IGPSObject gps = null;
		final String clazz = json.optString("class");
		
		if (TPVObject.NAME.equals(clazz)) {
			gps = this.parseTPV(json);
		} else if (SKYObject.NAME.equals(clazz)) {
			gps = this.parseSKY(json);
		} else if (GSTObject.NAME.equals(clazz)) {
			gps = this.parseGST(json);
		} else if (ATTObject.NAME.equals(clazz)) {
			gps = this.parseATT(json);
		} else if (SUBFRAMEObject.NAME.equals(clazz)) {
			gps = this.parseSUBFRAME(json);
		} else if (VersionObject.NAME.equals(clazz)) {
			gps = this.parseVERSION(json);
		} else if (DevicesObject.NAME.equals(clazz)) {
			gps = this.parseDEVICES(json);
		} else if (DeviceObject.NAME.equals(clazz)) {
			gps = this.parseDEVICE(json);
		} else if (WatchObject.NAME.equals(clazz)) {
			gps = this.parseWATCH(json);
		} else if (PollObject.NAME.equals(clazz)) {
			gps = this.parsePOLL(json);
		} else if (json.has("PRN")) { // SATObject
			gps = this.parsePRN(json);
		} else if (json.has("deltai")) { // ALMANACObject
			gps = this.parseALMANAC(json);
		} else if (json.has("IODC")) { // EPHEM1Object
			gps = this.parseEPHEM1(json);
		} else if (json.has("Crs")) { // EPHEM2Object
			gps = this.parseEPHEM2(json);
		} else if (json.has("IDOT")) { // EPHEM3Object
			gps = this.parseEPHEM3(json);
		} else if (json.has("ERD30")) { // ERDObject
			gps = this.parseERD(json);
		} else if (json.has("SVH32")) { // HEALTHObject
			gps = this.parseHEALTH(json);
		} else if (json.has("WNa")) { // HEALTH2Object
			gps = this.parseHEALTH2(json);
		} else if (json.has("WNlsf")) { // IONOObject
			gps = this.parseIONO(json);
		} else {
			throw new ParseException("Invalid object class: " + clazz);
		}
		return gps;
	}
1360899
public void readObject (ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        int ecount = in.readInt();
        for (int ii = 0; ii < ecount; ii++) {
            @SuppressWarnings("unchecked") K key = (K)in.readObject();
            @SuppressWarnings("unchecked") V value = (V)in.readObject();
            put(key, value);
        }
    }
905305
void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
        // when deserializing, parse the json string
        try {
            int length = in.readInt();
            byte[] buf = new byte[length];
            in.readFully(buf);
            if (parser == null) {
                // create it lazily, static so won't increase object size
                parser = new JsonParser();
            }
            JsonElement o = parser.parse(new String(buf, StandardCharsets.UTF_8));
            Field f = getClass().getDeclaredField("intMap");
            f.setAccessible(true);
            f.set(this, new SimpleIntKeyMap<>());

            for (Entry<String, JsonElement> e : o.asObject().entrySet()) {
                put(e.getKey(), e.getValue());
            }
        } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
            throw new IllegalStateException(e);
        }
    }
1027411
public Object parse(String in) throws ParseException {
		return parse(in, JSONValue.defaultReader.DEFAULT);
	}
827508
public Object parse(String text) throws DataValidationException {
        try {
            preValidate(text);
            Object object = _valueOf.invoke(text);
            postValidate(object);
            return object;
        } catch (DataValidationException x) {
            throw x;
        } catch (IllegalArgumentException x) {
            // various format errors from valueOf() - ignore the details
            throw new DataValidationException("FORMAT", _name, text);
        } catch (Throwable t) {
            throw new DataValidationException("", _name, text, t);
        }
    }
1126357
public static BBox parseBBoxString(String objectAsString) {
        String[] splittedObject = objectAsString.split(",");

        if (splittedObject.length != 4)
            throw new IllegalArgumentException("BBox should have 4 parts but was " + objectAsString);

        double minLon = Double.parseDouble(splittedObject[0]);
        double maxLon = Double.parseDouble(splittedObject[1]);

        double minLat = Double.parseDouble(splittedObject[2]);
        double maxLat = Double.parseDouble(splittedObject[3]);

        return new BBox(minLon, maxLon, minLat, maxLat);
    }
1008622
private void readObject(java.io.ObjectInputStream objectInputStreamIn)
                    throws java.io.IOException
                    , java.lang.ClassNotFoundException
    {

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "readObject"
                        , "objectInputStreamIn=" + objectInputStreamIn + "(java.io.ObjectInputStream)"
                            );

        objectInputStreamIn.defaultReadObject();
        availableSize = size; // Start as last commited.
        managedObjectsToAdd = new java.util.HashSet(1);
        managedObjectsToReplace = new java.util.HashSet();
        tokensToNotify = new java.util.HashSet(1); // Holds the set of tokens to notify about replacements. 

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "readObject"
                            );

    }
1155859
String acceptObjectKey(JsonEvent event) throws IOException {
        ensureEvent(event, JsonEvent.STRING);
        return parseObjectKey();
    }
646669
@Trivial
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        GetField fields = in.readFields();
        failure = (Throwable) fields.get(FAILURE, null);
        params = (String[]) fields.get(PARAMS, new String[] {});
        reason = fields.get(REASON, (short) 0);
    }