Skip to content

A framework for defining Application settings with annotatinos. This is to be used for settings which defined in static variables spread all over the project.

Notifications You must be signed in to change notification settings

vanyak/ASettings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Project created as a small research project which can be used later.

The functionality it provides is defining settings of your application using annotations and pushing them into your class' fields on demand (usually on app load).
It is sort of DI but without any container and works only for class field values.

Benefits of it:
- as a developer don't have to care about checking null values
- as a developer don't have to define default values 
- as a developer don't have to care about type casts

Here is code snippet for setting declaration:

class Foo {

@Setting(name="bar")
public static SOME_PROPERTY;

}

Now on application initialization when you read settings source and pass it to ASettings engine, the value of SOME_PROPERTY will be changed with one from the source.
The original value from compiled code will be saved as default value.

All settings and values are accessible via SettingsService so having a runtime admin section in you application allows you to treat and change this values uniformly without knowing each class and each field defined.

About

A framework for defining Application settings with annotatinos. This is to be used for settings which defined in static variables spread all over the project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages