001/** 002 * Copyright 2013 John Ericksen 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.androidtransfuse.gen.componentBuilder; 017 018import com.google.common.collect.ImmutableList; 019import org.androidtransfuse.adapter.ASTField; 020import org.androidtransfuse.adapter.ASTMethod; 021import org.androidtransfuse.adapter.ASTType; 022import org.androidtransfuse.annotations.Factory; 023import org.androidtransfuse.experiment.generators.FragmentOnSaveInstanceStateMethodCallbackGenerator; 024import org.androidtransfuse.experiment.generators.MethodCallbackGenerator; 025import org.androidtransfuse.model.InjectionNode; 026 027import javax.inject.Named; 028 029/** 030 * @author John Ericksen 031 */ 032@Factory 033public interface ComponentBuilderFactory { 034 035 MethodCallbackGenerator buildMethodCallbackGenerator(ASTType eventAnnotation, @Named("eventMethod") ASTMethod eventMethod, @Named("creationMethod")ASTMethod creationMethod); 036 037 FragmentOnSaveInstanceStateMethodCallbackGenerator buildFragmentOnSaveInstanceStateMethodCallbackGenerator(ASTType eventAnnotation, @Named("eventMethod") ASTMethod eventMethod, @Named("creationMethod")ASTMethod creationMethod); 038 039 ViewRegistrationGenerator buildViewRegistrationGenerator(/*@Assisted("viewInjectionNode")*/ @Named("viewInjectionNode") InjectionNode viewInjectionNode, String listenerMethod, /*@Assisted("targetInjectionNode")*/ @Named("targetInjectionNode") InjectionNode injectionNode, ViewRegistrationInvocationBuilder invocationBuilder); 040 041 ViewMethodRegistrationInvocationBuilderImpl buildViewMethodRegistrationInvocationBuilder(ASTMethod getterMethod); 042 043 ViewFieldRegistrationInvocationBuilderImpl buildViewFieldRegistrationInvocationBuilder(ASTField field); 044 045 ActivityDelegateRegistrationGenerator buildActivityRegistrationGenerator(ActivityDelegateASTReference activityDelegateASTReference, ImmutableList<ASTMethod> methods); 046 047 ActivityTypeDelegateASTReference buildActivityTypeDelegateASTReference(); 048 049 ActivityMethodDelegateASTReference buildActivityMethodDelegateASTReference(ASTMethod astMethod); 050 051 ActivityFieldDelegateASTReference buildActivityFieldDelegateASTReference(ASTField astField); 052}