private AnnotationUsage withExecuteBefore(File file) { file.add(Import.of(State.class).static_().setStaticMember("RESOLVED")); return AnnotationUsage.of(ExecuteBefore.class).set(Value.ofReference("RESOLVED")); }
private Method generateCreateEntity(File file) { final Type entityImplType = getSupport().entityImplType(); file.add(Import.of(entityImplType)); return Method.of("createEntity", entityImplType).protected_() .add("return new " + getSupport().entityImplName() + "();"); }
@Override public InterfaceField set(Type type) { f.set(type); return this; }
/** * Creates a new instance implementing this interface by using the default * implementation. * * @param lowerBound the lower bound, example: {@code "T"} * @return the new instance */ static Generic of(String lowerBound) { return of().setLowerBound(lowerBound); }
@Override public InterfaceMethod set(Type type) { m.set(type); return this; }
@Override public InterfaceField setName(String name) { f.setName(name); return this; }
@Override public JavadocTag copy() { return JavadocTag.of(name); } }
@Override public InterfaceMethod setName(String name) { m.setName(name); return this; }
@Override @SuppressWarnings("unchecked") public T set(Javadoc doc) { javadoc = doc.setParent(this); return (T) this; }
@Override public InterfaceField set(Value<?> val) { f.set(val); return this; }
@Override public Annotation set(Javadoc doc) { this.javadoc = doc.setParent(this); return this; }
@Override public EnumConstant set(Javadoc doc) { this.javadoc = doc.setParent(this); return this; }
@Override public File set(Javadoc doc) { this.doc = doc.setParent(this); return this; }
@Override public Field set(Javadoc doc) { javadoc = doc.setParent(this); return this; }