@Override public Internals getInternals() { switch (this) { case ADWORDS: return com.google.api.ads.adwords.lib.utils.AdWordsInternals.getInstance(); case AD_MANAGER: return com.google.api.ads.admanager.lib.utils.AdManagerInternals.getInstance(); default: return null; } } }
@Override public Internals getInternals() { switch (this) { case ADWORDS: return com.google.api.ads.adwords.lib.utils.AdWordsInternals.getInstance(); case AD_MANAGER: return com.google.api.ads.admanager.lib.utils.AdManagerInternals.getInstance(); default: return null; } } }
@SuppressWarnings("unchecked") private ProductPartitionTree(final ProductPartitionTreeImpl impl) { InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( impl, AdWordsInternals.getInstance().getAdsUtilityRegistry()) { @Override public String toString() { return impl.toString(); } }; this.impl = Reflection.newProxy(ProductPartitionTreeInterface.class, invocationHandler); }
/** Constructs a new report query builder. */ public Builder() { proxiedImpl = new ReportQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new service query builder. */ @SuppressWarnings("unchecked") public Builder() { proxiedImpl = new ServiceQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new service query builder. */ @SuppressWarnings("unchecked") public Builder() { proxiedImpl = new ServiceQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new service query builder. */ @SuppressWarnings("unchecked") public Builder() { proxiedImpl = new ServiceQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new service query builder. */ @SuppressWarnings("unchecked") public Builder() { proxiedImpl = new ServiceQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new service query builder. */ @SuppressWarnings("unchecked") public Builder() { proxiedImpl = new ServiceQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new report query builder. */ public Builder() { proxiedImpl = new ReportQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new service query builder. */ @SuppressWarnings("unchecked") public Builder() { proxiedImpl = new ServiceQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new report query builder. */ public Builder() { proxiedImpl = new ReportQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Constructs a new report query builder. */ public Builder() { proxiedImpl = new ReportQueryBuilderImpl(this); InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( proxiedImpl, AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.proxy = Reflection.newProxy(BuilderInterface.class, invocationHandler); }
/** Checks the utilities registry status. */ public void checkUtilitiesState() { Set<AdsUtility> expectedUtilities = new HashSet<>(); expectedUtilities.add(AdsUtility.REPORT_QUERY_BUILDER); assertEquals( expectedUtilities, AdWordsInternals.getInstance().getAdsUtilityRegistry().popRegisteredUtilities()); }
/** Checks the utilities registry status. */ public void checkUtilitiesState() { Set<AdsUtility> expectedUtilities = new HashSet<>(); expectedUtilities.add(AdsUtility.REPORT_QUERY_BUILDER); assertEquals( expectedUtilities, AdWordsInternals.getInstance().getAdsUtilityRegistry().popRegisteredUtilities()); }
@SuppressWarnings("unchecked") public SelectorBuilder() { InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( new SelectorBuilderImpl(), AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.impl = Reflection.newProxy(SelectorBuilderInterface.class, invocationHandler); }
@SuppressWarnings("unchecked") public SelectorBuilder() { InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( new SelectorBuilderImpl(), AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.impl = Reflection.newProxy(SelectorBuilderInterface.class, invocationHandler); }
@SuppressWarnings("unchecked") public SelectorBuilder() { InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( new SelectorBuilderImpl(), AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.impl = Reflection.newProxy(SelectorBuilderInterface.class, invocationHandler); }
@SuppressWarnings("unchecked") public SelectorBuilder() { InvocationHandler invocationHandler = new AdsUtilityInvocationHandler( new SelectorBuilderImpl(), AdWordsInternals.getInstance().getAdsUtilityRegistry()); this.impl = Reflection.newProxy(SelectorBuilderInterface.class, invocationHandler); }
/** * Test method for {@link AdWordsInternals#getInstance()}. */ @Test public void testGetInstance() { Internals internals = AdWordsInternals.getInstance(); String userAgent = internals.getUserAgentCombiner().getUserAgent("test"); assertTrue(userAgent.contains("AwApi")); assertFalse(userAgent.contains("DfaApi")); assertFalse(userAgent.contains("DfpApi")); }