Skip to content

Instantly share code, notes, and snippets.

@mikebrock
Created February 12, 2013 22:26
Show Gist options
  • Select an option

  • Save mikebrock/4774045 to your computer and use it in GitHub Desktop.

Select an option

Save mikebrock/4774045 to your computer and use it in GitHub Desktop.
private static Statement recordInlineReference(final Statement beanCreationStmt,
final InjectionContext ctx,
final MetaParameter parm) {
final String varName = InjectUtil.getUniqueVarName();
ctx.getProcessingContext()
.append(Stmt.declareFinalVariable(varName, parm.getType(), beanCreationStmt));
final Statement stmt = Refs.get(varName);
ctx.addInlineBeanReference(parm, stmt);
return stmt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment