text
stringlengths
3
1.18M
package com.androinject.test.components; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class InstanceCounter { private static Map<String, Integer> counters = new HashMap<String, Integer>(); public static void increase(String className) { Integer value = counters...
package com.androinject.test.components; public abstract class InsertService extends ValueService { protected ValueService first; protected ValueService second; public void setFirst(ValueService first) { this.first = first; } public void setSecond(ValueService second) { this.second = second...
package com.androinject.test.components; public class SetterExceptionService { public void setValue(Object object) { throw new IllegalStateException(); } }
package com.androinject.test.components; public class ManagedService { private ValueService first; private ValueService second; private ValueService third; public void setFirst(ValueService first) { this.first = first; } public void setSecond(ValueService second) { this.second = second; }...
package com.androinject.test.components; public class PostInsertService extends InsertService { public static int getInstanceCount() { return InstanceCounter.getCount(PostInsertService.class.getName()); } public PostInsertService() { InstanceCounter.increase(this.getClass().getName()); } ...
package com.androinject.test.components; public class ValueBbbService extends ValueService { public static int getInstanceCount() { return InstanceCounter.getCount(ValueBbbService.class.getName()); } public ValueBbbService() { System.out.println("created bbb service"); InstanceCounter.increase(t...
package com.androinject.test.components; public class ValueCccService extends ValueService { public static int getInstanceCount() { return InstanceCounter.getCount(ValueCccService.class.getName()); } public ValueCccService() { InstanceCounter.increase(this.getClass().getName()); } @Override ...
package com.androinject.test.components; public abstract class ValueService { protected int counter; protected ValueService() { this.counter = 0; } public void increaseCounterByOne() { this.counter++; } public int getCounter() { return this.counter; } public void throwEx...
package com.androinject.test.components; public class ConstructorExceptionService { public ConstructorExceptionService() { throw new IllegalStateException(); } }
package com.androinject.test.components; public class PreInsertService extends InsertService { public static int getInstanceCount() { return InstanceCounter.getCount(PreInsertService.class.getName()); } public PreInsertService() { InstanceCounter.increase(this.getClass().getName()); } @Overr...
package com.androinject.test.components; public class ValueAaaService extends ValueService { public static int getInstanceCount() { return InstanceCounter.getCount(ValueAaaService.class.getName()); } public ValueAaaService() { InstanceCounter.increase(this.getClass().getName()); } @Override ...
package com.androinject.test.components; public class MedianInsertService extends InsertService { public static int getInstanceCount() { return InstanceCounter.getCount(MedianInsertService.class.getName()); } public MedianInsertService() { InstanceCounter.increase(this.getClass().getName()); } ...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.androinject.android.factory.input; import java.io.InputStream; import android.content.Context; import com.androinject.core.factory.input.InputSource; public class AndroidInputSource implements InputSource { private Context context; private InputStream inputStream; private int resId; ...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.androinject.core.factory.input; import java.io.InputStream; public interface InputSource { public InputStream getInputStream(); public void close(); }
package com.androinject.core.factory.input; import java.io.IOException; import java.io.InputStream; public class InputStreamInputSource implements InputSource { private InputStream inputStream; public InputStreamInputSource(InputStream inputStream) { this.inputStream = inputStream; } @Override...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.androinject.core.factory.exceptions; public class ComponentInstantiationException extends ComponentCreationException { private static final long serialVersionUID = 1L; public ComponentInstantiationException(String message, Throwable cause) { super(message, cause); } public ComponentIn...
package com.androinject.core.factory.exceptions; public class IncompatibleComponentTypeException extends ComponentException { private static final long serialVersionUID = 1L; public IncompatibleComponentTypeException() { } public IncompatibleComponentTypeException(String message) { super(message);...
package com.androinject.core.factory.exceptions; public abstract class ComponentException extends RuntimeException { private static final long serialVersionUID = 1L; public ComponentException(String message, Throwable cause) { super(message, cause); } public ComponentException(String message) { ...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.androinject.core.factory.exceptions; public class IncompatiblePropertyException extends ComponentCreationException { private static final long serialVersionUID = 1L; public IncompatiblePropertyException(String message, Throwable cause) { super(message, cause); } public IncompatiblePro...
package com.androinject.core.factory.exceptions; public class InvalidComponentConfigurationException extends ComponentException { // TODO: not thrown at the moment.. should be thrown by e.g. xml parser private static final long serialVersionUID = 1L; public InvalidComponentConfigurationException() { ...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.androinject.core.aware; public interface ComponentIdAware extends Aware { public void setComponentId(String componentId); }
package com.androinject.core.aware; import com.androinject.core.ComponentFactory; import com.androinject.core.definitions.ComponentDefinition; import com.androinject.core.definitions.ManagedComponentDefinition; public class ComponentFactoryAwareProcessor extends AbstractAwareProcessor<ComponentFactoryAware> { ...
package com.androinject.core.aware; import com.androinject.core.definitions.ComponentDefinition; import com.androinject.core.definitions.ManagedComponentDefinition; public class ComponentIdAwareProcessor extends AbstractAwareProcessor<ComponentIdAware> { public ComponentIdAwareProcessor() { super(Componen...
package com.androinject.core.aware; public interface Aware { }
package com.androinject.core.aware; import com.androinject.core.definitions.ComponentDefinition; import com.androinject.core.definitions.ManagedComponentDefinition; import com.androinject.core.factory.AbstractComponentProcessor; abstract public class AbstractAwareProcessor<T> extends AbstractComponentProcessor ...
package com.androinject.core.aware; import com.androinject.core.definitions.ComponentDefinition; import com.androinject.core.definitions.ManagedComponentDefinition; import com.androinject.core.factory.AbstractComponentProcessor; public class ComponentInitializationAwareProcessor extends AbstractComponentProcess...
package com.androinject.core.aware; public interface ComponentInitializationAware extends Aware { public void afterInjectionFinished(); }
package com.androinject.core.aware; import com.androinject.core.ComponentFactory; public interface ComponentFactoryAware extends Aware { public void setComponentFactory(ComponentFactory componentFactory); }
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.androinject.test.app.test; import android.content.Context; import com.androinject.test.app.TestApplication; import com.androinject.test.components.TestComponent; public class Utilities { public static TestComponent getComponentOrFail(Context context, String id) { TestApplication app = (Test...
package com.androinject.examples.getstarted.activities; import android.os.Bundle; import android.view.View; import android.widget.TextView; import com.androinject.android.ManagedActivity; import com.androinject.examples.getstarted.R; import com.androinject.examples.getstarted.controller.ExampleController; public cla...
package com.androinject.examples.getstarted.services; public class ExampleServiceAddition implements ExampleService { public int doComplexComputation(int first, int second) { return first + second; } }
package com.androinject.examples.getstarted.services; public interface ExampleService { // implemented by ExampleServiceAddition public int doComplexComputation(int first, int second); }
package com.androinject.examples.getstarted.controller; import com.androinject.examples.getstarted.services.ExampleService; public class ExampleController { private ExampleService service; public String computeResult(String first, String second) { int firstInt = Integer.parseInt(first); int secondI...
package com.androinject.examples.getstarted; import com.androinject.android.AndroInjectApplication; public class MyApplication extends AndroInjectApplication { @Override public void onCreate() { super.onCreate(R.raw.components); } }
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/* * Copyright 2011 andro-inject developers * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
package com.cnwow.status; import java.util.List; import java.util.Map; import android.content.Context; import android.graphics.Color; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.SimpleAdapter; public class MySimpleAdapter extends SimpleA...
package com.cnwow.status; import java.text.SimpleDateFormat; import java.util.Date; public class Utils { public static String getCurrentTime() { SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm"); Date curDate = new Date(System.currentTimeMillis());// 获取当前时间 return formatter.forma...
package com.cnwow.status; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.os.Message...
package com.cnwow.status; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; impo...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 Stewart Gateley <birbeck@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...