You're not making much sense.  If you want to know the name of
"objRef" you can just include

String nameOfObjRef = "objRef";

in your code.  Won't do you much good, of course, since there's
nothing (outside of some complex debugging scenarios) you can do with
it.

You CAN find the names of fields (and methods) in a class, via
reflections.  And of course you can easily get the class name of an
object with getClass().getName().

On Nov 3, 12:47 pm, Darkside Android <darksideandr...@gmail.com>
wrote:
> Object objRef = new Object();
>
> String nameOfObjRef = "objRef"; << this is what I need returned. Is
> this possible?
>
> On Nov 3, 10:11 am, Kumar Bibek <coomar....@gmail.com> wrote:
>
> > name of an object reference?
>
> > On Wed, Nov 3, 2010 at 10:37 PM, Darkside Android <darksideandr...@gmail.com
>
> > > wrote:
> > > Object getThisObjName= new Object();
>
> > > I'd like to get the name of an object reference.
>
> > > Is this possible via reflection in Android?
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to