This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Parcel | |
| public class Tester { | |
| @Parcel(converter = EnumExampleConverter.class) | |
| public static enum EnumExample{ | |
| ONE, | |
| TWO; | |
| } | |
| public static class EnumExampleConverter implements ParcelConverter<EnumExample>{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Tester extends SuperClass { | |
| private SuperCaller superCaller = new SuperCaller(); | |
| private Delegate delegate = new Delegate(superCaller); | |
| public static void main(String[] args){ | |
| Tester tester = new Tester(); | |
| tester.runMe(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.test; | |
| import org.junit.Test; | |
| import javax.tools.*; | |
| import java.io.ByteArrayOutputStream; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.net.URI; | |
| import java.util.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.format("0x%08X", Integer.decode("0x00020000") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CodeModelIfForExample { | |
| private static final String CLASS_NAME = "TestClass"; | |
| public static void main(String args[]) throws Exception{ | |
| JCodeModel codeModel = new JCodeModel(); | |
| JDefinedClass c = codeModel._class(CLASS_NAME); | |
| writeIfElse(codeModel, c); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Generated(value = "org.androidtransfuse.TransfuseAnnotationProcessor", date = "01/02/2013 21:35:08 MST") | |
| public class Transfuse$Parcels | |
| implements ParcelRepository | |
| { | |
| private final Map<Class, ParcelableFactory> parcelWrappers = new HashMap<Class, ParcelableFactory>(); | |
| public Transfuse$Parcels() { | |
| parcelWrappers.put(ParcelExample.class, new Transfuse$Parcels.ParcelExample_Parcelable_0Factory()); | |
| parcelWrappers.put(ParcelTwo.class, new Transfuse$Parcels.ParcelTwo_Parcelable_0Factory()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Parcels { | |
| public static final String PARCELS_NAME = "Parcels"; | |
| public static final String PARCELS_REPOSITORY_NAME = "Transfuse$Parcels"; | |
| public static final String PARCELS_PACKAGE = "org.androidtransfuse"; | |
| private static ParcelRepository PARCELS; | |
| public static void initialise(ClassLoader classLoader){ | |
| loadParcels(classLoader); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Parcels { | |
| public static final String PARCELS_NAME = "Parcels"; | |
| public static final String PARCELS_REPOSITORY_NAME = "Transfuse$Parcels"; | |
| public static final String PARCELS_PACKAGE = "org.androidtransfuse"; | |
| private static final ParcelRepository PARCELS; | |
| static{ | |
| ParcelRepository parcelsCreation; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| unset PATH; | |
| # $1 = path to backup | |
| # $2 = name of backup folder | |
| # ------------- system commands used by this script -------------------- | |
| ID=/usr/bin/id; | |
| ECHO=/bin/echo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //static way (dont want to do this) | |
| public class SlideshowActivity extends Activity{ | |
| public static void start(ArrayList<String> images, Song song, Uri videoUri, Context ctx){ | |
| Intent intent = new Intent(ctx, SlideshowActivity.class); | |
| intent.putExtra(EXTRA_IMAGE_FILE_NAMES, images); | |
| intent.putExtra(EXTRA_SELECTED_SONG, song); | |
| intent.putExtra(EXTRA_VIDEO_URI, videoUri); | |
| ctx.startActivity(intent); | |
| } |