[go: nahoru, domu]

blob: 7546d1027d690de9aef30d878d84506cf6c6dcff [file] [log] [blame]
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package androidx.ui.material.icons.generator
import com.squareup.kotlinpoet.ClassName
import com.squareup.kotlinpoet.MemberName
/**
* Package names used for icon generation.
*/
enum class PackageNames(val packageName: String) {
MaterialIconsPackage("androidx.ui.material.icons"),
MaterialIconsTestPackage("androidx.ui.material.icons.test"),
VectorPackage("androidx.compose.ui.graphics.vector")
}
/**
* [ClassName]s used for icon generation.
*/
object ClassNames {
val Icons = PackageNames.MaterialIconsPackage.className("Icons")
val VectorAsset = PackageNames.VectorPackage.className("VectorAsset")
}
/**
* [MemberName]s used for icon generation.
*/
object MemberNames {
val LazyMaterialIcon =
MemberName(PackageNames.MaterialIconsPackage.packageName, "lazyMaterialIcon")
val MaterialPath = MemberName(PackageNames.MaterialIconsPackage.packageName, "materialPath")
val Group = MemberName(PackageNames.VectorPackage.packageName, "group")
}
/**
* @return the [ClassName] of the given [classNames] inside this package.
*/
fun PackageNames.className(vararg classNames: String) = ClassName(this.packageName, *classNames)