1 11 package org.eclipse.swt.tools.internal; 12 13 import java.lang.reflect.Field ; 14 15 public class FieldData extends ItemData { 16 17 Field field; 18 19 public FieldData(Field field, String str) { 20 super(str); 21 this.field = field; 22 } 23 24 public static String [] getAllFlags() { 25 return new String []{"no_gen", "no_wince"}; 26 } 27 28 public String getAccessor() { 29 return (String )getParam("accessor"); 30 } 31 32 public String getCast() { 33 String cast = ((String )getParam("cast")).trim(); 34 if (cast.length() > 0) { 35 if (!cast.startsWith("(")) cast = "(" + cast; 36 if (!cast.endsWith(")")) cast = cast + ")"; 37 } 38 return cast; 39 } 40 41 public String getExclude() { 42 return (String )getParam("exclude"); 43 } 44 45 public Field getField() { 46 return field; 47 } 48 49 public void setAccessor(String str) { 50 setParam("accessor", str); 51 } 52 53 public void setCast(String str) { 54 setParam("cast", str); 55 } 56 57 public void setExclude(String str) { 58 setParam("exclude", str); 59 } 60 61 } 62 | Popular Tags |