Class FieldAndMethods

    • Field Detail

      • field

        java.lang.reflect.Field field
      • javaObject

        java.lang.Object javaObject
    • Constructor Detail

      • FieldAndMethods

        FieldAndMethods​(Scriptable scope,
                        MemberBox[] methods,
                        java.lang.reflect.Field field)
    • Method Detail

      • getDefaultValue

        public java.lang.Object getDefaultValue​(java.lang.Class<?> hint)
        Description copied from class: ScriptableObject
        Implements the [[DefaultValue]] internal method.

        Note that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.

        A hint of null means "no hint".

        Specified by:
        getDefaultValue in interface Scriptable
        Overrides:
        getDefaultValue in class ScriptableObject
        Parameters:
        hint - the type hint
        Returns:
        the default value for the object See ECMA 8.6.2.6.