What is the modifiers key in getMetadata() for a method?

The result of calling getMetadata() on a method or user-defined function in Lucee 5.1.2.24 includes the key ‘modifier’, which I don’t know about. It’s not present in Lucee 4.5.3.020, or ACF 11 (all I have handy at the moment).

What is that? Is it documented somewhere?

Thanks.

I would guess it’s the access modifier like public, private, package, remote, etc. Does the data you see support that guess?

Thanks for jumping in Brad, but no, the ‘access’ attribute is what you’re thinking of, which shows up in getMetadata() as ‘access’.

Oddly enough, when I supply it explicitly in the code, it’s still empty in getMetadata().

public function f() modifier="asdfqwer" zzz=1
{
}
writeDump(getMetadata(f));

That gives (among other keys)

{
  access="public",
  modifier="",
  zzz=1
}

Kind of seems like a leaked var, if you can’t set it. Or it’s something else I don’t understand.

Try making your function static. Is that what it’s for?

Hah, didn’t even realize Lucee has static methods now, so thanks for the poke! But no…

component
{
    public static function f()
    {
    }

    writeDump(getMetadata(test::f));
}

The modifier key is still “”.