Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.sf.alchim.codeplus.spoonprocessor;
This template defines the needed template code for matching and/or generating field accesses through getters and setters:

on Spoon FieldAccess example
public class StupidGetSetTemplate<_FieldType_> implements Template {
name of the field
    String __field_;
name of the field with the first letter uppercased
    String _Field_;
    public StupidGetSetTemplate(CtTypeReference typeString field) {
         = type;
         = field;
        char[] chars = field.toCharArray();
        chars[0] = Character.toUpperCase(chars[0]);
         = new String(chars);
    _FieldType_ _field_;
    public _FieldType_ get_Field_() {
        return ;
    public void set_Field_(_FieldType_ v) {
         = v;
New to GrepCode? Check out our FAQ X