요즘 많이 쓰는 싱글톤 for Java 더블락체크(보통), 빌퍼지(good, mostly used), enum(better for java) 더블락체크 lazy initialization을 하는데 함수에 synchronized를 쓰는게아니라 함수 안에서 null체크를 한번 하고나서 null인 경우에만 synchronized를 쓰게함 null이 아닐때눈 synchronized를 호출하지 않아 성능 향상 빌퍼지(Bill puge) A.K.A. Initialization-on-demand holder Class안에 LazyHolder static class를 선언하고 static final 인스턴스를 생성 getInstance시에 위의 static class안에 있는 인스턴스를 리턴 장점 Class안에 static 변수가 없기때문에 lazy initialization이 구현됨 쓰레드세이프한 이유: And since the initialization phase writes the static variable INSTANCE in a serial operation, all subsequent concurrent invocations of the getInstance will return the same correctly initialized INSTANCE without incurring any additional synchronization overhead. final이기 때문에! public class BillPughSingleton { private BillPughSingleton (){} private static class SingletonHelper { private static final BillPughSingleton INSTANCE = new BillPughSingl...
https://stackoverflow.com/questions/32422264/jenkins-vs-travis-ci-which-one-would-you-use-for-a-open-source-project Jenkins: 완전 무료, 호스팅 필요 Travis CI: 공개저장소는 무료, 비공개저장소는 유료, 아래와 같은 .travis.yml 파일만 작성하면 된다. script: - sudo ant clean https://docs.travis-ci.com/user/reference/precise/
UI Automator? UI Automator is a UI testing framework suitable for cross-app functional UI testing across system and installed apps. Espresso는 소스코드가 있어야 테스트할수 있고 화이트박스스타일임 UI Automator은 구현정보가 필요없고 블랙박스스타일임 UI Automator Viewer? 현재 표시되는 UI 구성요소를 검사하고 분석하기 쉽게 GUI를 제공해줌 @TODO 집에서 테스트해보기! To launch the uiautomatorviewer tool: Launch the target app on a physical device. Connect the device to your development machine. Open a terminal window and navigate to the <android-sdk>/tools/ directory. Run the tool with this command: $ uiautomatorviewer
댓글
댓글 쓰기