-
Notifications
You must be signed in to change notification settings - Fork 334
Expose collected superclass properties/methods in pkl:reflect
#1106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pkl-core/src/test/files/LanguageSnippetTests/input/api/reflect4.pkl
Outdated
Show resolved
Hide resolved
fae0f86
to
0d21d7d
Compare
public VmTyped getMirror(VmClass clazz) { | ||
return MirrorFactories.propertyFactory.create(new Mirror(this, clazz)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to derive allAnnotations
/allModifiers
without somehow "currying" the VmClass
into the mirror for the ClassProperty
. If you've got any better ideas here, I'm all ears!
e1c24e7
to
b4e49f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
||
/// The annotations of this module, appended with any from the containing class's superclasses. | ||
/// | ||
/// Annotations are ordered starting with the current class and walking up the class hierarchy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned the order here, but allProperties/Methods/Modifiers
also follow the same rule right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned with defining behavior for allProperties
/allMethods
because those are implemented in terms of the existing VmClass.collectAll(Properties|Methods)
methods and iteration order isn't well-defined for them.
This also isn't applicable for allModifiers
because the implementation builds the bitset with bitwise OR and calls VmModifier.getMirrors
, which has a stable order for elements based on bits set.
b4e49f1
to
44693f7
Compare
44693f7
to
53d5405
Compare
No description provided.