List of usage examples for jdk.nashorn.internal.objects NativeDate construct
@Constructor(arity = 7) public static Object construct(final boolean isNew, final Object self, final Object... args)
From source file:com.mongodb.jvm.json.nashorn.NativeDateTransformer.java
License:Apache License
public Object transform(Object object, JsonImplementation implementation) { if (object instanceof ScriptObject) { Object date = ((ScriptObject) object).get("$date"); if ((date != null) && (date.getClass() != Undefined.class)) return NativeDate.construct(true, null, date); }//from w w w. j a v a 2 s .co m return null; }
From source file:com.threecrickets.jvm.json.nashorn.util.NashornNativeUtil.java
License:Mozilla Public License
public static NativeDate to(Date date) { return (NativeDate) NativeDate.construct(true, null, date.getTime()); }
From source file:org.bson.jvm.nashorn.NativeDateCodec.java
License:Apache License
public NativeDate decode(BsonReader reader, DecoderContext decoderContext) { return (NativeDate) NativeDate.construct(true, null, reader.readDateTime()); }