シングルトンの代替え (Dagger通さなくてもいいやつ)
staticの代替え
例えばHogeActivity.createIntent()
など
あと定数とかね
class A() { | |
init { | |
val s: String = getStr() | |
println("${s.length}") // java.lang.NullPointerException | |
} | |
fun getStr(): String { | |
return str | |
} | |
interface Thing<T> { | |
T thing(); | |
} | |
class CharSequenceThing implements Thing<CharSequence> { | |
@Override public CharSequence thing() { | |
return "CharSequence!"; | |
} | |
} |
@startuml
start
if (Have an access token?) then (yes)
else (no)
if (Have an refresh token?) then (yes)
while (Request access token) is (error)
if (retry?) then (yes)
このフェーズはほぼすべてのことが唯一の開発メンバーのスキルとマインド次第で決まるので、チームとしてできることは極めて少ないです。また、この段階のプロジェクトはリリース前に捨てる可能性もあるので、導入コストの高い開発ツールはまだ必要ありません。
.idea/codeStyleSettings.xml
を用意してスタイルガイドに沿ってフォーマットできるようにしたinterface Thing { | |
Object thing(); | |
} | |
class CharSequenceThing implements Thing { | |
@Override public CharSequence thing() { | |
return "CharSequence!"; | |
} | |
} |
#!/usr/local/bin/bash | |
set_term_bgcolor(){ | |
local R=$1 | |
local G=$2 | |
local B=$3 | |
/usr/bin/osascript <<EOF | |
tell application "iTerm" | |
tell the current terminal | |
tell the current session |
import java.util.Arrays; | |
class NonCapturing { | |
public static void main(String... args) { | |
run(new Runnable() { | |
@Override public void run() { | |
System.out.println("Hey!"); | |
} | |
}); | |
} |
package com.fewlaps.android.permissiongranter; | |
import android.app.Activity; | |
import android.content.pm.PackageManager; | |
import android.os.Build; | |
import android.support.test.uiautomator.UiDevice; | |
import android.support.test.uiautomator.UiObject; | |
import android.support.test.uiautomator.UiObjectNotFoundException; | |
import android.support.test.uiautomator.UiSelector; | |
import android.support.v4.content.ContextCompat; |