Android Open Source - sugar Sugar Config






From Project

Back to project page sugar.

License

The source code is released under:

Copyright (C) 2012 by Satya Narayan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the S...

If you think the Android project sugar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.orm.util;
// w w w. java 2 s .c o  m
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.util.Log;

import java.lang.reflect.Field;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class SugarConfig {

    static Map<Class<?>, List<Field>> fields = new HashMap<Class<?>, List<Field>>();

    public static void setFields(Class<?> clazz, List<Field> fieldz) {
         fields.put(clazz, fieldz);
    }

    public static List<Field> getFields(Class<?> clazz) {
        if (fields.containsKey(clazz)) {
            List<Field> list = fields.get(clazz);
            return Collections.synchronizedList(list);
        }

        return null;
    }

    public static void clearCache() {
        fields.clear();
        fields = new HashMap<Class<?>, List<Field>>();
    }

}




Java Source Code List

com.example.AddNoteActivity.java
com.example.ClientApp.java
com.example.NewNote.java
com.example.NoteListActivity.java
com.example.NoteRelation.java
com.example.Note.java
com.example.SugarActivity.java
com.example.Tag.java
com.example.TextNote.java
com.orm.SchemaGenerator.java
com.orm.SugarApp.java
com.orm.SugarContext.java
com.orm.SugarDb.java
com.orm.SugarRecord.java
com.orm.SugarTransactionHelper.java
com.orm.dsl.Column.java
com.orm.dsl.Ignore.java
com.orm.dsl.NotNull.java
com.orm.dsl.Table.java
com.orm.dsl.Unique.java
com.orm.query.Condition.java
com.orm.query.Select.java
com.orm.util.Collection.java
com.orm.util.ManifestHelper.java
com.orm.util.NamingHelper.java
com.orm.util.NumberComparator.java
com.orm.util.QueryBuilder.java
com.orm.util.ReflectionUtil.java
com.orm.util.SugarConfig.java
com.orm.util.SugarCursorFactory.java