src/jdk/nashorn/internal/runtime/Property.java
Print this page
*** 27,36 ****
--- 27,37 ----
import static jdk.nashorn.internal.runtime.PropertyDescriptor.CONFIGURABLE;
import static jdk.nashorn.internal.runtime.PropertyDescriptor.ENUMERABLE;
import static jdk.nashorn.internal.runtime.PropertyDescriptor.WRITABLE;
+ import java.io.Serializable;
import java.lang.invoke.MethodHandle;
import java.util.Objects;
import jdk.nashorn.internal.codegen.ObjectClassGenerator;
import jdk.nashorn.internal.codegen.types.Type;
*** 41,51 ****
*
* @see PropertyMap
* @see AccessorProperty
* @see UserAccessorProperty
*/
! public abstract class Property {
/*
* ECMA 8.6.1 Property Attributes
*
* We use negative flags because most properties are expected to
* be 'writable', 'configurable' and 'enumerable'. With negative flags,
--- 42,52 ----
*
* @see PropertyMap
* @see AccessorProperty
* @see UserAccessorProperty
*/
! public abstract class Property implements Serializable {
/*
* ECMA 8.6.1 Property Attributes
*
* We use negative flags because most properties are expected to
* be 'writable', 'configurable' and 'enumerable'. With negative flags,
*** 98,107 ****
--- 99,110 ----
protected int flags;
/** Property field number or spill slot. */
private final int slot;
+ private static final long serialVersionUID = 2099814273074501176L;
+
/**
* Constructor
*
* @param key property key
* @param flags property flags
*** 356,365 ****
--- 359,375 ----
* @return a getter for this property as {@code type}
*/
public abstract MethodHandle getGetter(final Class<?> type);
/**
+ * Hook to initialize method handles after deserialization.
+ *
+ * @param structure the structure class
+ */
+ abstract void initMethodHandles(final Class<?> structure);
+
+ /**
* Get the key for this property. This key is an ordinary string. The "name".
* @return key for property
*/
public String getKey() {
return key;