Skip to content
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

add CtTypeInformation.getDeclaredOrInheritedField(fieldName) #967

Merged
merged 1 commit into from
Nov 14, 2016

Conversation

pvojtechovsky
Copy link
Collaborator

Here you are. New PR just for CtTypeInformation.getDeclaredOrInheritedField(fieldName). Including some tests.

@monperrus
Copy link
Collaborator

now that we have shadow classes, I'd propose to put those two methods in CtType and the methods would return CtField (instead of CtFieldReference)

@monperrus
Copy link
Collaborator

well, no, because it would not be aligned with the rest of the design. ideally, now that we have shadow classes, we could get rid of CtTypeInformation that returns references.

@pvojtechovsky
Copy link
Collaborator Author

What do you mean by shadow classes?

In case of PrettyPrinting the references to fields are better, Because their creation is less expensive. PrettyPrinting needs only field name so reference is good.

Anyway I am not sure what exactly would you expect. I do not feel need for that change.

@monperrus
Copy link
Collaborator

that's fine this way.

What do you mean by shadow classes?

CtClasses built by runtime reflection (hence with no method body)

@monperrus monperrus merged commit 17e0baf into INRIA:master Nov 14, 2016
@pvojtechovsky pvojtechovsky deleted the getDeclaredOrInheritedField branch November 15, 2016 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants