Android Open Source - roboject Inject Resource






From Project

Back to project page roboject.

License

The source code is released under:

Apache License

If you think the Android project roboject listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
//w  w w  .  j a v a2s .co  m
This file is part of Roboject

Copyright (c) 2010-2011 akquinet A.G.

Contact:  http://www.akquinet.de/en

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 law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package de.akquinet.android.roboject.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * <p>
 * Inject a resource to the annotated field. For this to work, you must either use
 * <p>
 * You can specify the id of the resource to inject as annotation value name. If not
 * supplied, R.id.X will be used, where X is the name of the annotated field.
 * You can also supply the type of the resource.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(value = ElementType.FIELD)
public @interface InjectResource {
    String DEFAULT_VALUE = "";

    /**
     * Defines the id of the resource to inject. If not supplied,
     * R.X.Y will be used, where X is a type string according to the field type and Y the name of the annotated field.
     */
    String name() default DEFAULT_VALUE;

    /**
     * Overrides the type detection by specifying the concrete type of this resource, e.g. drawable or string
     */
    String type() default DEFAULT_VALUE;
}




Java Source Code List

de.akquinet.android.roboject.RobojectActivity.java
de.akquinet.android.roboject.RobojectException.java
de.akquinet.android.roboject.RobojectFragmentActivity.java
de.akquinet.android.roboject.RobojectFragment.java
de.akquinet.android.roboject.RobojectSupportFragment.java
de.akquinet.android.roboject.Roboject.java
de.akquinet.android.roboject.ServiceRegistry.java
de.akquinet.android.roboject.ServicesConnector.java
de.akquinet.android.roboject.annotations.InjectExtra.java
de.akquinet.android.roboject.annotations.InjectLayout.java
de.akquinet.android.roboject.annotations.InjectObject.java
de.akquinet.android.roboject.annotations.InjectResource.java
de.akquinet.android.roboject.annotations.InjectService.java
de.akquinet.android.roboject.annotations.InjectView.java
de.akquinet.android.roboject.injectors.ClassInjector.java
de.akquinet.android.roboject.injectors.ExtraInjector.java
de.akquinet.android.roboject.injectors.FieldInjector.java
de.akquinet.android.roboject.injectors.Injector.java
de.akquinet.android.roboject.injectors.LayoutInjector.java
de.akquinet.android.roboject.injectors.ResourceInjector.java
de.akquinet.android.roboject.injectors.ServiceInjector.java
de.akquinet.android.roboject.injectors.ViewInjector.java
de.akquinet.android.roboject.tutorial.activities.AdderActivity.java
de.akquinet.android.roboject.tutorial.activities.RobojectAdderActivity.java
de.akquinet.android.roboject.tutorial.services.TestService.java
de.akquinet.android.roboject.util.AndroidUtil.java
de.akquinet.android.roboject.util.IntentRegistry.java
de.akquinet.android.roboject.util.ReflectionUtil.java
de.akquinet.android.robojecttest.InjectLayoutTest.java
de.akquinet.android.robojecttest.InjectLocalServiceFragmentTest.java
de.akquinet.android.robojecttest.InjectLocalServiceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectLocalServiceViaClassTest.java
de.akquinet.android.robojecttest.InjectLocalServiceViaObjectTest.java
de.akquinet.android.robojecttest.InjectRemoteServiceFragmentTest.java
de.akquinet.android.robojecttest.InjectRemoteServiceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectRemoteServiceTest.java
de.akquinet.android.robojecttest.InjectResourceCustomTest.java
de.akquinet.android.robojecttest.InjectResourceFragmentTest.java
de.akquinet.android.robojecttest.InjectResourceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectResourceTest.java
de.akquinet.android.robojecttest.InjectServiceFragmentTest.java
de.akquinet.android.robojecttest.InjectServiceSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectServiceTest.java
de.akquinet.android.robojecttest.InjectViewCustomTest.java
de.akquinet.android.robojecttest.InjectViewFragmentActivityTest.java
de.akquinet.android.robojecttest.InjectViewFragmentTest.java
de.akquinet.android.robojecttest.InjectViewSupportFragmentTest.java
de.akquinet.android.robojecttest.InjectViewTest.java
de.akquinet.android.robojecttest.activities.DummyFragmentActivity.java
de.akquinet.android.robojecttest.activities.DummySupportFragmentActivity.java
de.akquinet.android.robojecttest.activities.InjectLayoutTestActivity.java
de.akquinet.android.robojecttest.activities.InjectLocalServiceViaClassTestActivity.java
de.akquinet.android.robojecttest.activities.InjectLocalServiceViaObjectTestActivity.java
de.akquinet.android.robojecttest.activities.InjectRemoteServiceTestActivity.java
de.akquinet.android.robojecttest.activities.InjectResourceTestActivity.java
de.akquinet.android.robojecttest.activities.InjectServiceTestActivity.java
de.akquinet.android.robojecttest.activities.InjectViewTestActivity.java
de.akquinet.android.robojecttest.activities.InjectViewTestFragmentActivity.java
de.akquinet.android.robojecttest.fragments.InjectNonAndroidServiceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectNonAndroidServiceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectRemoteServiceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectRemoteServiceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectResourceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectResourceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectServiceTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectServiceTestSupportFragment.java
de.akquinet.android.robojecttest.fragments.InjectViewTestFragment.java
de.akquinet.android.robojecttest.fragments.InjectViewTestSupportFragment.java
de.akquinet.android.robojecttest.services.AdderFragmentImplementation.java
de.akquinet.android.robojecttest.services.AdderImplementation.java
de.akquinet.android.robojecttest.services.AdderInterface.java
de.akquinet.android.robojecttest.services.AdderSupportFragmentImplementation.java
de.akquinet.android.robojecttest.services.RemoteTestService.java
de.akquinet.android.robojecttest.services.TestService.java