Hrisey


Source link: https://github.com/mg6maciej/hrisey

Hrisey

Boilerplate code suppressor tool for Android platform based on Project Lombok.

More details on available annotaions in wiki pages.

Current limitation: doesn't work with JDK 8. Any help resolving this issue is highly appreciated.

Usage

Add Hrisey as a dependency:

dependencies {

  provided 'pl.mg6.hrisey:hrisey:0.3.1' 
}

Install Hrisey Plugin in IntelliJ IDEA or Android Studio.

And then just start using it:

@hrisey.Parcelable class ParcelableClass implements android.os.Parcelable {

String myString; 
}

Note: adding implements android.os.Parcelable seems redundant, but is there only because of a limitation when using certain Jetbrains APIs. Hrisey will generate it if missing, but IDEA / Android Studio will not undestand it.

This will generate

class ParcelableClass implements android.os.Parcelable {

public static final android.os.Parcelable.Creator<ParcelableClass> CREATOR = new CreatorImpl();

String myString;

public int describeContents() {

return 0;
  
}

public void writeToParcel(android.os.Parcel dest, int flags) {

dest.writeString(this.myString);

  
}

protected ParcelableClass(android.os.Parcel source) {

this.myString = source.readString();

  
}

private static class CreatorImpl implements android.os.Parcelable.Creator<ParcelableClass> {

 public ParcelableClass createFromParcel(android.os.Parcel source) {

 return new ParcelableClass(source);

}

 public ParcelableClass[] newArray(int size) {

 return new ParcelableClass[size];

}

  
}
 
}

during preprocessing phase. You will never see this code again!

Optimization hint: when possible, add final to classes with @Parcelable annotation to avoid some reflection and storing unnecessary bits of data.

Why is Hrisey better?

Because it "adds" code to your classes. Other tools use JSR 269 to generate new classes, which leads to leaking abstraction in your code. Hrisey is transparent and can be technically removed from your project in a matter of minutes. But when you start using it, you will never think of doing so.

Why is Hrisey worse?

Because it "adds" code to your classes. You have to be careful not to put there too much logic yourself, because debugging might be more complicated.

About Lombok

Project Lombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code. See LICENSE for the Project Lombok license.

To start, run:

ant -projecthelp 

HINT: If you'd like to develop lombok in eclipse, run ant eclipse first. It creates the necessary project infrastructure and downloads dependencies. Note that, in order to run "LombokizedEclipse.launch", you need to have "Eclipse SDK" installed.

For a list of all authors, see the AUTHORS file.

Project Lombok was started by:

Reinier Zwitserloot
twitter: @surial
home: http://zwitserloot.com/

Roel Spilker
twitter: @rspilker

Resources

Konveyor is a tiny library which intends to battle RecyclerView.Adapter Hell by introducing "Composition over inheritance" approach when dealing with RecyclerView adapters. While making your Adapter related logic testable by providing abstraction layer over its logic, it will make you forget all of the ViewType hassle all together.

Secure and efficient cryptography library for Android. (Auto fix SecureRandom bugs in API 18 and below.)

Features

  • AES-256 encryption algorithm
  • CBC/CTR mode of operations
  • Block padding with PKCS7 (only with CBC)
  • Computationally secure random salt (of cipher block size)
  • Password stretching with PBKDF2
  • Random IV generated on each encryption (16 bytes)
  • Supports MD5, SHA1, and SHA2 hash functions
  • Generate secure keys with SecureRandom or random.org
  • Asymmetric encryption with RSA
  • Auto handle large data by using hybrid asymmetric encryption
  • Supported RSA key sizes are 2048 bits and 4096 bits

This is an IntelliJ/Android Studio IDE plugin to detect the code with @Experimental and @Beta annotations and show a custom icon on the gutter when you use it.

Waterfall Toolbar is an Android version of Material Design's web component waterfall toolbar. Basically, what it does is dynamize an ordinary Toolbar, increasing and decreasing its shadow when an associated view is scrolled.

A smart switchable button, support multiple tabs.

Add clickable markers to android street view.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes