CharSequence () { CharSequence text = myText(); if (text == null) { // use super.getText() instead of super.getChars() to avoid extra myText() call text = super.getText(); myText = new SoftReference<>(text); } return text; }