I have a Java class with a static variable
package com.mytest
public class MyClass{
public static final TextClass TEXT_CLASS = new TextClass();
}
How can I access the object TEXT_CLASS
using reflection?
(I have the string "com.mytest.MyClass.TEXT_CLASS"
. I need to access the object.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…