Esempio n. 1
0
        public ArrayValue getProperties(Env env)
        {
            ArrayValue array = new ArrayValueImpl();

            HashMap <StringValue, ClassField> fieldMap = _cls.getClassFields();

            for (ClassField field : fieldMap.values())
            {
                /// XXX: private fields of parent classes are hidden
                ReflectionProperty prop
                    = ReflectionProperty.create(env, _cls, field.getName(), false);

                array.put(env.wrapJava(prop));
            }

            ArrayList <StringValue> staticFieldList = _cls.getStaticFieldNames();

            for (StringValue fieldName : staticFieldList)
            {
                ReflectionProperty prop
                    = ReflectionProperty.create(env, _cls, fieldName, true);

                array.put(env.wrapJava(prop));
            }

            return(array);
        }