This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void creditAccount(long accountId, double amount, Transaction transaction) { | |
| final long _______accountId = accountId; | |
| // | |
| // if (amount < 0.0) { amount = amount * -1 } | |
| // | |
| AccountService accountService; | |
| Object objectFrom_MAP = servicesLookup.get("AccountService"); | |
| if ( objectFrom_Map != null && objectFrom_Map.getName().startsWith("Account") && objectFrom_Map instanceof AccountService) { | |
| accountService = (AccountService) o; | |
| double amount_toCredit = amount; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @MetaMacro({Inject.class, Bound.class, DataField.class}) | |
| public @interface UiProperty { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private final BeanProvider<MyDecoratedBean> inj1597_MyDecoratedBean_creational = new BeanProvider<MyDecoratedBean>() { | |
| public MyDecoratedBean getInstance(final CreationalContext context) { | |
| final MyDecoratedBean inj1596_MyDecoratedBean = new MyDecoratedBean(); | |
| context.addBean(context.getBeanReference(MyDecoratedBean.class, arrayOf_19635043Annotation_25657110), inj1596_MyDecoratedBean); | |
| final _$1173375600_MyDecoratedBean_proxy inj1596_MyDecoratedBean_iproxy = new _$1173375600_MyDecoratedBean_proxy(); | |
| inj1596_MyDecoratedBean_iproxy.__$setProxiedInstance$(inj1596_MyDecoratedBean); | |
| return inj1596_MyDecoratedBean_iproxy; | |
| } | |
| }; | |
| private final MyDecoratedBean inj1596_MyDecoratedBean = inj1597_MyDecoratedBean_creational.getInstance(context); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Retention(RetentionPolicy.RUNTIME) | |
| public @interface LogCall { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @CodeDecorator | |
| public class LogCallDecorator extends IOCDecoratorExtension<LogCall> { | |
| public LogCallDecorator(Class<LogCall> decoratesWith) { | |
| super(decoratesWith); | |
| } | |
| @Override | |
| public List<? extends Statement> generateDecorator(InjectableInstance<LogCall> ctx) { | |
| ctx.getInjector().addInvokeBefore(ctx.getMethod(), | |
| Stmt.invokeStatic(TestDataCollector.class, "beforeInvoke", Refs.get("a0"), Refs.get("a1"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <web-app xmlns="http://java.sun.com/xml/ns/javaee" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
| http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
| version="2.5"> | |
| <servlet> | |
| <servlet-name>ErraiServlet</servlet-name> | |
| <servlet-class>org.jboss.errai.bus.server.servlet.StandardAsyncServlet</servlet-class> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EntryPoint | |
| @Templated | |
| public class HelloWorldForm extends Composite { | |
| @Inject @Admin @DataField Button deleteButton; | |
| @EventHandler("deleteButton") | |
| private void handleSendClick(ClickEvent event) { | |
| // do some deleting! | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @ApplicationScoped | |
| public class SessionManager { | |
| private boolean isAdmin = false; | |
| public boolean isAdmin() { | |
| return isAdmin; | |
| } | |
| public void setAdmin(boolean admin) { | |
| isAdmin = admin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EntryPoint | |
| @Templated | |
| public class HelloWorldForm extends Composite { | |
| @Inject @Admin @DataField Button deleteButton; | |
| @Inject SessionManager sessionManager; | |
| @EventHandler("deleteButton") | |
| private void handleSendClick(ClickEvent event) { | |
| // do some deleting! |