private AllocationReporter getAllocationReporter(LanguageInfo info) { AllocationReporter allocationReporter = new AllocationReporter(info); allocationReporters.add(allocationReporter); for (EventBinding.Allocation<? extends AllocationListener> binding : allocationBindings) { if (binding.getAllocationFilter().contains(info)) { allocationReporter.addListener(binding.getElement()); } } return allocationReporter; }
private AllocationReporter getAllocationReporter(LanguageInfo info) { AllocationReporter allocationReporter = new AllocationReporter(info); allocationReporters.add(allocationReporter); for (EventBinding.Allocation<? extends AllocationListener> binding : allocationBindings) { if (binding.getAllocationFilter().contains(info)) { allocationReporter.addListener(binding.getElement()); } } return allocationReporter; }
private <T extends AllocationListener> EventBinding<T> addAllocationBinding(EventBinding.Allocation<T> binding) { if (TRACE) { trace("BEGIN: Adding allocation binding %s%n", binding.getElement()); } this.allocationBindings.add(binding); for (AllocationReporter allocationReporter : allocationReporters) { if (binding.getAllocationFilter().contains(allocationReporter.language)) { allocationReporter.addListener(binding.getElement()); } } if (TRACE) { trace("END: Added allocation binding %s%n", binding.getElement()); } return binding; }
private <T extends AllocationListener> EventBinding<T> addAllocationBinding(EventBinding.Allocation<T> binding) { if (TRACE) { trace("BEGIN: Adding allocation binding %s%n", binding.getElement()); } this.allocationBindings.add(binding); for (AllocationReporter allocationReporter : allocationReporters) { if (binding.getAllocationFilter().contains(allocationReporter.language)) { allocationReporter.addListener(binding.getElement()); } } if (TRACE) { trace("END: Added allocation binding %s%n", binding.getElement()); } return binding; }