public OJField(OJClass declarer, OJModifier modif, OJClass type, String name) { Environment env = declarer.getEnvironment(); ModifierList modlist = new ModifierList(); TypeName tname = TypeName.forOJClass(type); modlist.add(modif.toModifier()); FieldDeclaration d = new FieldDeclaration(modlist, tname, name, null); this.substance = new OJFieldSourceCode(env, declarer, d); }
public final void setModifiers(OJModifier mods) throws CannotAlterException { setModifiers(mods.toModifier()); }