src/eu/inmite/android/plugin/butterknifezelezny/InjectWriter.java
protected void generateFields() {
		// add injections into main class
		for (Element element : mElements) {
			if (!element.used) {
				continue;
			}

			StringBuilder injection = new StringBuilder();
            if(mInjectType == InjectType.BUTTERKNIFE) {
                injection.append("@butterknife.InjectView("); // annotation
                injection.append(element.getFullID());
                injection.append(") ");
            } else if(mInjectType == InjectType.NATIVE_FINDS) {
                injection.append("private ");
            }
			if (element.nameFull != null && element.nameFull.length() > 0) { // custom package+class
				injection.append(element.nameFull);
			} else if (Defintions.paths.containsKey(element.name)) { // listed class
				injection.append(Defintions.paths.get(element.name));
			} else { // android.widget
				injection.append("android.widget.");
				injection.append(element.name);
			}
			injection.append(" ");
			injection.append(element.fieldName);
			injection.append(";");

			mClass.add(mFactory.createFieldFromText(injection.toString(), mClass));
		}
	}
/**
	 * Create fields for injections inside main class
	 */
Create fields for injections inside main class
Create fields for injections inside main class
protected void generateFields() {
		for (Element element : mElements) {
			if (!element.used) {
				continue;
			}
			StringBuilder injection = new StringBuilder();
            if(mInjectType == InjectType.BUTTERKNIFE) {
                injection.append("@butterknife.InjectView("); 
                injection.append(element.getFullID());
                injection.append(") ");
            } else if(mInjectType == InjectType.NATIVE_FINDS) {
                injection.append("private ");
            }
			if (element.nameFull != null && element.nameFull.length() > 0) { 
				injection.append(element.nameFull);
			} else if (Defintions.paths.containsKey(element.name)) { 
				injection.append(Defintions.paths.get(element.name));
			} else { 
				injection.append("android.widget.");
				injection.append(element.name);
			}
			injection.append(" ");
			injection.append(element.fieldName);
			injection.append(";");
			mClass.add(mFactory.createFieldFromText(injection.toString(), mClass));
		}
	}
protected void generateFields ( ) { for ( Element element : mElements ) { if ( ! element . used ) { continue ; } StringBuilder injection = new StringBuilder ( ) ; if ( mInjectType == InjectType . BUTTERKNIFE ) { injection . append ( "@butterknife.InjectView(" ) ; injection . append ( element . getFullID ( ) ) ; injection . append ( ") " ) ; } else if ( mInjectType == InjectType . NATIVE_FINDS ) { injection . append ( "private " ) ; } if ( element . nameFull != null && element . nameFull . length ( ) > 0 ) { injection . append ( element . nameFull ) ; } else if ( Defintions . paths . containsKey ( element . name ) ) { injection . append ( Defintions . paths . get ( element . name ) ) ; } else { injection . append ( "android.widget." ) ; injection . append ( element . name ) ; } injection . append ( " " ) ; injection . append ( element . fieldName ) ; injection . append ( ";" ) ; mClass . add ( mFactory . createFieldFromText ( injection . toString ( ) , mClass ) ) ; } }
Create fields for injections inside main class
Create fields for injections inside main class
// add injections into main class // annotation // custom package+class // listed class // android.widget