本文整理匯總了Java中jsinterop.base.Any類的典型用法代碼示例。如果您正苦於以下問題:Java Any類的具體用法?Java Any怎麽用?Java Any使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Any類屬於jsinterop.base包,在下文中一共展示了Any類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getExpressionReturnTypeForAttribute
import jsinterop.base.Any; //導入依賴的package包/類
/**
* Guess the type of the expression based on where it is used.
* The guessed type can be overridden by adding a Cast to the desired type at the
* beginning of the expression.
* @param attribute The attribute the expression is in
* @return
*/
private String getExpressionReturnTypeForAttribute(Attribute attribute)
{
String attributeName = attribute.getKey().toLowerCase();
if (attributeName.indexOf("@") == 0 || attributeName.indexOf("v-on:") == 0)
return "void";
if ("v-if".equals(attributeName) || "v-show".equals(attributeName))
return "boolean";
if (currentProp != null)
return currentProp.getType().toString();
return Any.class.getCanonicalName();
}
示例2: getInExpressionType
import jsinterop.base.Any; //導入依賴的package包/類
public String getInExpressionType()
{
if (type == VForDefinitionType.ARRAY_OR_RANGE)
return Any.class.getCanonicalName();
return "Object";
}
示例3: prop
import jsinterop.base.Any; //導入依賴的package包/類
@JsOverlay
public final T prop( @Nonnull final String key, @Nullable final Any value )
{
Js.asPropertyMap( this ).set( key, value );
return self();
}
示例4: vForExpressionFromJava
import jsinterop.base.Any; //導入依賴的package包/類
public static <T> Any vForExpressionFromJava(Collection<T> collection)
{
return Js.asAny(JsUtils.arrayFrom(collection));
}
示例5: isReturnAny
import jsinterop.base.Any; //導入依賴的package包/類
public boolean isReturnAny()
{
return Any.class.getCanonicalName().equals(type.toString());
}
示例6: getFrom
import jsinterop.base.Any; //導入依賴的package包/類
@JsOverlay
default Any getFrom(Object on) {
return Jso.getProperty(on, this);
}
示例7: getProperty
import jsinterop.base.Any; //導入依賴的package包/類
@JsOverlay
public static Any getProperty(Object on, SymbolOrString s) {
return JsoMagic.getProperty(on, s);
}