static object assignment/init ?# Java - 爪哇娇娃
i*p
1 楼
想读点文章搞明白这种用法,用什么关键字到网上其搜索?
public class NotePadProvider extends ContentProvider {
....
private static final UriMatcher sUriMatcher;
......
static {
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(NotePad.AUTHORITY, "notes", NOTES);
sUriMatcher.addURI(NotePad.AUTHORITY, "notes/#", NOTE_ID);
sNotesProjectionMap = new HashMap();
sNotesProjectionMap.put(Notes._ID, Notes._ID);
sNotesProjectionMap.put
public class NotePadProvider extends ContentProvider {
....
private static final UriMatcher sUriMatcher;
......
static {
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
sUriMatcher.addURI(NotePad.AUTHORITY, "notes", NOTES);
sUriMatcher.addURI(NotePad.AUTHORITY, "notes/#", NOTE_ID);
sNotesProjectionMap = new HashMap
sNotesProjectionMap.put(Notes._ID, Notes._ID);
sNotesProjectionMap.put