butterknife.compiler.Parameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of butterknife-compiler Show documentation
Show all versions of butterknife-compiler Show documentation
Field and method binding for Android views.
package butterknife.compiler;
import com.squareup.javapoet.TypeName;
/** Represents a parameter type and its position in the listener method. */
final class Parameter {
static final Parameter[] NONE = new Parameter[0];
private final int listenerPosition;
private final TypeName type;
Parameter(int listenerPosition, TypeName type) {
this.listenerPosition = listenerPosition;
this.type = type;
}
int getListenerPosition() {
return listenerPosition;
}
TypeName getType() {
return type;
}
public boolean requiresCast(String toType) {
return !type.toString().equals(toType);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy