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 com.kekyazilim.annotationreflectionexample | |
| import android.support.v7.app.AppCompatActivity | |
| import android.os.Bundle | |
| import android.widget.Button | |
| import android.widget.TextView | |
| import com.kekyazilim.annotationreflectionexample.translator.kotlin.KBindTranslateView | |
| import com.kekyazilim.annotationreflectionexample.translator.kotlin.KViewTranslator | |
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 com.kekyazilim.annotationreflectionexample.translator.kotlin | |
| import android.app.Activity | |
| import android.widget.TextView | |
| import com.kekyazilim.annotationreflectionexample.translator.fakes.FakeTranslatorJson | |
| import java.util.* | |
| object KViewTranslator { |
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
| class Cafe { | |
| fun getProduct(name:String): Product{ | |
| val cooker = Cooker() | |
| return cooker.prepareProduct(name) | |
| } | |
| } |
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
| class Cafe(val cooker: Cooker) { | |
| fun getProduct(name:String): Product{ | |
| return cooker.prepareProduct(name) | |
| } | |
| } |
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
| class Barmen: Personnel { | |
| override fun prepareProduct(name: String): Product { | |
| // To Do something to get ingredients object by using name | |
| . | |
| . | |
| . | |
| return Product(ingredients) | |
| } | |
| } |
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
| class Cooker : Personnel { | |
| override fun prepareProduct(name: String): Product { | |
| // To Do something to get ingredients object by using name | |
| . | |
| . | |
| . | |
| return Product(ingredients) | |
| } | |
| } |
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
| interface Personnel { | |
| fun prepareProduct(name: String): Product | |
| } |
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
| class Cafe(val personnel: Personnel) { | |
| fun getProduct(name:String): Product{ | |
| return personnel.prepareProduct(name) | |
| } | |
| } |
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
| class MainActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| val cooker = Cooker() | |
| val cafeOld = Cafe(cooker) | |
| cafeOld.getProduct("makarna") |
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
| /** | |
| * Responsible to manage image process | |
| * @author ismailgungor | |
| * @since 1.0 | |
| */ | |
| interface IImageProcess { | |
| /** | |
| * This method loads image to target with by using url | |
| * |