Re: Getting Method objects without reflection



mark@xxxxxxxxxx wrote:

> And also, methods and fields can be obfuscated while strings cannot.
> So being able to call getName() on a Field has a big security advantage
> over using raw reflection.

Since this feature -- if it were added -- would certainly be implemented by the
compiler generating traditional (string-based) reflective code under-the-hood,
I don't think that it would permit more thorough obfuscation that is currently
possible.

Personally, I can see some motivation for this, but I think it provides too
little benefit to justify the cost in complexity (for me, the programmer,
having to learn and use an even /more/ grossly over-complicated language) nor
in development costs (/every/ tool which is Java source-code aware -- e.g..
Eclipse -- would have to be updated).

BTW, the syntax you propose would not work for reflective access to either
constructors or fields, and that -- IMO -- is a big negative point.

-- chris


.



Relevant Pages

  • Re: Getting Method objects without reflection
    ... methods and fields can be obfuscated while strings cannot. ... >> So being able to call getName() on a Field has a big security advantage ... > I don't think that it would permit more thorough obfuscation that is currently ... There are certainly many things wrong with the syntax. ...
    (comp.lang.java.programmer)
  • Re: [PHP] Object to array conversion oddity
    ... I can see that there might be some reason for converting the object with additional information in some circumstances (much like serialization to strings does), but here we're only talking about casting, which should be a 'best-fit' data matter. ... here we have undocumented behaviour justified by yet more undocumented behaviour! ... I think trying to preserve this information is entirely pointless - it's not as if you can cast back from an array to an object, and I can't think of any circumstances in which it is preferable to using reflection. ...
    (php.general)
  • Re: How to query n web services
    ... When I added web references, I wrote 10 different web references name. ... and then invoke service01.someMethod... ... The subset is given by strings. ... Using Reflection, you can use a string to create an instance of an object and then invoke methods on that instance. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: DLL privacy / ILMerge / Dotfuscator
    ... force obfuscation of certain parts in your code ... another aproach i choose is to encrypt all my strings, ... Since VB doesn't implement linking so that the dll ... > be embedded in the exe, it must be distributed as is. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Databinding - nicht wirklich, oder?
    ... ist Reflection schon OK. ... die Dinge über OOP zu erreichen. ... da keine eigenen strings benutzt werden müssen. ... Dipl.Inf. Frank Dzaebel ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)