Browsing projects by Tag(s)

Select a tag to browse associated projects and drill deeper into the tag cloud.

Showing page 1 of 10

A successor in spirit of the annotations provided by the Spring-Modules Cache library that allows aspect based caching to be added to a Spring based application by simple annotation.

5.0
 
  0 reviews  |  28 users  |  10,306 lines of code  |  0 current contributors  |  Analyzed 4 days ago
 
 

version 0.9.5 - added Maven repository, UseCases, javadoc, JavaCodeSerializer, getResources, Vfs A Java runtime metadata analysis, in the spirit of ScannotationsReflections scans your classpath, indexes the metadata, allows you to query it on runtime and may save and collect that information for ... [More] many modules within your project. Using Reflections you can query your metadata such as: get all subtypes of some type get all types/methods/fields annotated with some annotation, w/o annotation parameters matching get all resources matching matching a regular expression How to use?a typical use of Reflections would be: Reflections reflections = new Reflections("my.project.prefix"); Set> subTypes = reflections.getSubTypesOf(SomeClassOrInterface.class); Set> annotated = reflections.getTypesAnnotatedWith(SomeAnnotation.class); Set> annotated1 = reflections.getTypesAnnotatedWith( new SomeAnnotation() {public String value() {return "1";} public Class annotationType() {return SomeAnnotation.class;}}); Set propertiesFiles = reflections.getResources(Pattern.compile(".*\\.properties")); //depends on ResourcesScanner configured, as on next examplebasically, to use Reflections for scanning and querying, instantiate it with a Configuration, for example new Reflections(new ConfigurationBuilder() .filterInputsBy(new FilterBuilder.Include(FilterBuilder.prefix("my.project.prefix"))) .setUrls(ClasspathHelper.getUrlsForPackagePrefix("my.project.prefix")) .setScanners(new SubTypesScanner(), new TypeAnnotationsScanner().filterResultsBy(filter), new ResourcesScanner()));than use the convenient methods to query the metadata, such as getSubTypesOf, getTypesAnnotatedWith, getMethodsAnnotatedWith and more. You can use other scanners defined in Reflections as well, such as: SubTypesScanner, TypeAnnotationsScanner, FieldAnnotationsScanner, MethodAnnotationsScanner, ResourcrsScanner and more. Than use the equivalent query method in the Reflections object. browse the javadoc for more info also, browse the tests directory to see some more examples MavenRepoto use Reflections via a maven repository, configure your pom.xml with reflections-repo Reflections Maven2 Repository http://reflections.googlecode.com/svn/repo than add a dependency to Reflections in your pom.xml org.reflections reflections the latest version... UseCasesReflections can also: save scanned metadata and collect it later on runtime, for quick bootstrap of your application save your model entities metadata - fully qualified name of packages and types, fields and methods - so you can later reference these in a static manner find all resources matching a regular expression (for example find all .properties files or .xml files) see the UseCases wiki page Reflections Maven pluginThere is the ReflectionsMojo Maven plugin available for your project. With simple configuration you can save all scanned metadata into xml files upon compiling. Later on, when your project is bootstrapping you can let Reflections collect all those resources and re-create that metadata for you, making it available at runtime without re-scanning the classpath - thus reducing the bootstrapping time. Use this maven configuration in your pom file: org.reflections reflections-maven the latest version... reflections process-classes than, on runtime: Reflections reflections = isProduction() ? Reflections.collect() : new Reflections("your.package.here");Check out in the ReflectionsMojo wiki page Extending ReflectionsYou can easily extend Reflections by : create your specialized scan class, should implement Scanner provide a query method within that scan class next, use that scanner instance to first configure Reflections and than to query patches and extension are welcomed! Cheers [Less]

0
 
  0 reviews  |  4 users  |  35,993 lines of code  |  1 current contributor  |  Analyzed about 20 hours ago
 
 

Message from the owner(s) Version 1.0 is released. Check out the Getting Started page.

5.0
 
  0 reviews  |  2 users  |  4,738 lines of code  |  4 current contributors  |  Analyzed over 1 year ago
 
 

DocBlock/JavaDoc annotations support for PHP5. Supporting single and multi valued annotations accessible through extended Reflection API. Example annotations: @SimpleAnnotation @SingleValuedAnnotation(true) @SingleValuedAnnotation(-3.141592) @SingleValuedAnnotation('Hello World!') ... [More] @SingleValuedAnnotationWithArray({1, 2, 3}) @MultiValuedAnnotation(key = 'value', anotherKey = false, andMore = 1234)Annotate classes, methods, properties. Works also if --preserve-docs is disabled. Checkout ShortTutorialByExample for a quick introduction to annotations using Addendum. [Less]

0
 
  0 reviews  |  2 users  |  1,558 lines of code  |  0 current contributors  |  Analyzed 3 days ago
 
 

Quick start with Netbeans IDE News Project now has a MavenRepo ... jenabean uses Jena's flexible RDF/OWL api to persist java beans. It takes an unconventional approach to binding that is driven by the java object model rather than an OWL or RDF schema. jenabean is annotation ... [More] based and does not place any interface or extension requirements on your java object model. By default jenabean uses typical java bean conventions to derive RDF property URI’s, for example, the java bean property “name” would become RDF property “:name”. jenabean allows for explicit binding between an object property and a particular RDF property. (See Book.java for an example of binding arbitrary bean properties to the Dublin Core schema.) Code ExamplesTo get a quick idea of how using jenabean m [Less]

0
 
  0 reviews  |  1 user  |  64,535 lines of code  |  0 current contributors  |  Analyzed 5 days ago
 
 

JCROM (pronounced "Jack-rom") stands for Java Content Repository Object Mapper. It is a lightweight framework for mapping Java objects to/from a Java Content Repository (JCR). This is commonly called Object Content Mapping. JCROM relies on annotations only, so there are no XML ... [More] configuration files involved. JCROM ensures that your objects are mapped to the JCR according to best practices, meanwhile abstracting the gritty details and making your code clean and readable. annotation based (needs Java 1.5) lightweight, minimal external dependencies simple to learn, easy to use (and test) removes error prone boiler plate code works with any JCR implementation works well with Guice and Spring vision: do for JCR what Hibernate did for JDBC [Less]

4.0
   
  0 reviews  |  1 user  |  38,959 lines of code  |  2 current contributors  |  Analyzed 1 day ago
 
 

Object 2 GuiIntroductionThis project aim to generate automatically GUI corresponding to an existing instance of object, helping developper to win time on first stage of (GUI) development. Generation is based on variables annotations with multiple parameters, helping to design more sophisticated ... [More] GUI. Works as simple as it needs only some lines of code to generate a "JPanel" reflecting an objects where variables becomes viewable/editable. All input controls are normally done automatically to forbbid bad input of the user avoiding developper headache. (eg : Textfield binded to an Integer : user shouldn't be allowed to put non digit characters). Functions- Support unboxed,boxed variables : int, float, double, Int, Float, array, array, Date and more. - Different type of Swing/Swingx Object available for each kinds of variables (Eg : a Integer variable could be represented as a TextField or a Slider; an enumeration could be represented as a JList or a Combobox). JTextField, JSlider, JCombobox, JList, JXDatePicker, RotativeSlider, JWSlider (custom and fun sliders)... - Support Collections using JList to select wich object to GUIiffy. (Object containend in collections). - XML files aivailable for customising labels/tooltip of the generated components. - Recursive introspection (A object could contains other objects that will be encap in a TaskPane like panel). - Event system to be noticed of all changed values in objects. (Needed for eg to repaint something or do an action if something has to be reflected somewhere). - Different Layout available (BoxLayout, Grid, NullLayout) to construct the gui. How to useCreating the GUI from an object instanceTest objet = new Test(); JWPanel panel = (JWPanel) ParseurAnnotations.CreatePanelFromObject(objet);when of course, you defined Test with all Annotations required. Exemple 1 // Define the general Layout used by the future panel. @GUI_CLASS(type=GUI_CLASS.Type.BoxLayout, BoxLayout_property=GUI_CLASS.Type_BoxLayout.Y) public class Test { public enum Rank { DEUCE, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE }; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.LIST) private Rank Enum_2 = Rank.TEN; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.TEXTFIELD) private float Valeur1 = 12.5f; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SLIDER, min=0, max=10, divider=1000) private float Valeur2 = 0f; ... all getters/setters of these variables (used by reflection to get values) ... } This whill result in something like that : Exemple 2public enum Rank { DEUCE, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE }; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.LIST) private Rank Enum_2 = Rank.TEN; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.TEXTFIELD) private float Valeur1 = 12.5f; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SLIDER, min=0, max=10, divider=1000) private float Valeur2 = 0.125f; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SLIDER, min=0, max=5000, divider=1, slider_type=GUI_FIELD_TYPE.Type_SLIDER.FLAT) private Integer Valeur3 = 50; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SLIDER, min=0, max=5, divider=1, slider_type=GUI_FIELD_TYPE.Type_SLIDER.FLAT) private float Valeur4 = 4f; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SLIDER, min=0, max=50, divider=10, slider_type=GUI_FIELD_TYPE.Type_SLIDER.FLAT) private int Valeur4Bis = 4; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SLIDER, slider_type=GUI_FIELD_TYPE.Type_SLIDER.ROTATIVE) private int Valeur5 = 50; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.CHECKBOX) private boolean Boolean1 = false; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.CHECKBOX) private boolean Boolean2 = true; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.COLOR) private JWColor Couleur = new JWColor(0,0,0,255); @GUI_FIELD_TYPE() private String String1 = "Salut mon enfant"; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.TEXTFIELD) private String String2 = "Salut mon enfant"; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.CALENDAR) private Date Date_Sys = new Date(); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.CALENDAR) private Date Date_Fixed = new Date(15,12,2005); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.COMBO) private Rank Enum_1 = Rank.THREE; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.LIST) private Float []Float_list={1f,2f,4f,9f,95f,100f,200.5f}; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.ARRAYLIKE) private Float []Float_sub_array={5f,4f,3f,8f,9f,10f,0.5f}; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.ARRAYLIKE) private Float [][]Float_DUOsub_array= {{1f,4f,3f,8f,9f,10f,0.5f}, {2.23f,4f,3f,8f,9f,10f,0.5f}, {3f,4f,3f,8f,9f,10f,0.5f}, {4f,4.44f,3f,8f,9f,10f,0.5f}}; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.PANELISABLE) private Test2 Test_sub_object = new Test2(); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.LISTLIKE) private Vector Vector_Objets = new Vector(); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.LISTLIKE) private ArrayList ArrayList_Objets = new ArrayList(); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.LISTLIKE) private LinkedList LinkedList_Objets = new LinkedList(); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.MAPLIKE) private HashMap Hashmap_Objets_intkey = new HashMap (); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.MAPLIKE) private HashMap Hashmap_Objets_stringkey = new HashMap (); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.SETLIKE) private HashSet HashSet = new HashSet(); @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.ARRAYLIKE) private Object []EDIT_MixedObject1DArray = {0,new String("Bloating"),"Extraordinary", 5.5f}; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.ARRAYLIKE) private String [][]String2DArray= { {"I'm a pure string 1-1", "I'm a pure string 2-1"}, {"I'm a pure string 2-1", "I'm a pure string 2-2"}, }; @GUI_FIELD_TYPE(type=GUI_FIELD_TYPE.Type.ARRAYLIKE) private Object [][]Object2DArrayMixedTypes= { {1.2f,"",2} };will give u : Exemple 3 - Using the myEventOccurred to be noticed of user changeJWPanel panel = (JWPanel) ParseurAnnotations.CreatePanelFromObject(objet); panel.addMyEventListener(new MyEventListener() { public void myEventOccurred(MyChangedEvent e) { // That is called if user changes the value of inside components. System.err.println("*** Object has changed, make the needed things ..."); } });Exemple 4 - Load / Saving labels of generated gui for customisationThis method is used if you want more user friendly labels (and tooltips) instead of variables names. 1) Save the panel and it's current Labels in a XML file by doing : Saving labels into a file (needed the first time) GUI2XMLLabel.SaveLabel(panel, "labels.xml"); // Panel is the generated panel.2) Edit eventually this file to change the labels and tooltips. 3) Load the label inside application by doing : GUI2XMLLabel.LoadLabel(panel, "labels.xml"); // Panel is the generated panel. [Less]

0
 
  0 reviews  |  1 user  |  3,112 lines of code  |  0 current contributors  |  Analyzed 5 days ago
 
 

Agave is a Java 1.5+ library that allows you to cleanly expose a domain model through a Web interface. Simply put, it serves as the C in the MVC approach to interface programming. It is compact with very little conceptual overhead, yet powerful enough to account for evolution in the approache to Web ... [More] programming on the Servlet API and the lack of stateful transactions across requests over the HTTP protocol. It provides this functionality without a large down payment because Agave is very easy to learn if you are familiar with Web programming, and in many cases can provide the shortest path between a concept and its actualization. Where to Go From HereGettingStarted for first steps UserDocumentation for more information [Less]

0
 
  0 reviews  |  1 user  |  15,792 lines of code  |  1 current contributor  |  Analyzed about 1 year ago
 
 

A small collection of reusable aspects for use in J2SE applications.

0
 
  0 reviews  |  1 user  |  1,100 lines of code  |  2 current contributors  |  Analyzed about 20 hours ago
 
 

objectify-led is a small Java library for binding object or class properties at runtime using annotations, reducing boilerplate code. Values can be taken from the System, from properties files, any arbitrary source in fact, and automatically set on properties. Instead of having chunks of code ... [More] such as public class Foo { private static String BLAH = "default-value"; private String myString; private int myInt = -1; public static void main(String[] args) { if (System.getProperty("blah.value) != null) { BLAH = System.getProperty("blah.value"); } Foo foo = new Foo(); if (System.getProperty("mystring.value) != null) { foo.myString = System.getProperty("mystring.value"); } if (System.getProperty("myint.value) != null) { try { String intValue = System.getProperty("myint.value"); foo.myInt = Integer.parseInt(intValue; } catch (NumberFormatException e) { ... } } } ... }you can instead use objectify-led to bind the properties for you : public class Foo { @Property("blah.value"); private static String BLAH = "default-value"; @Property("mystring.value"); private String myString; @Property("myint.value"); private int myInt = -1; public static void main(String[] args) { Foo foo = new Foo(); new PropertySetter().process(foo); } ... }By default, Strings and all primitive/wrapper classes are handled. If you wish to convert a property value into a specific class, you just need to plug in your own object factory. Additionally, the source of the properties is completely up to you. By default, properties are taken from the system environment and any Properties objects you may have plugged in; custom property contexts can be used to provide a facade to more complex value stores. Static values are handled in two ways. If an instance of a class is processed, both its instance and static members are populated if necessary. If a class is processed, just the static members are populated (what with the lack of an instance and everything…). [Less]

0
 
  0 reviews  |  1 user  |  3,675 lines of code  |  0 current contributors  |  Analyzed 8 days ago
 
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.