Package org.zkoss.zats.mimic
Interface QueryAgent
- All Superinterfaces:
Agent
- All Known Subinterfaces:
ComponentAgent,DesktopAgent,PageAgent
- All Known Implementing Classes:
DefaultComponentAgent,DefaultDesktopAgent,DefaultPageAgent
Agent that can be used to query other agent.
- Since:
- 1.2.1
- Author:
- henrichen
-
Method Summary
Modifier and TypeMethodDescription<T> TTry to get a instance of target class for this query agent, the target class is usually aOperationAgentor a nativeComponent
if it cannot get a instance of target class, it will throwAgentException.<T> booleanCan get a instance of target class for this query agent.to find the first component agent with the selector in this query agent.to find the component agents with the selector in this query agent.Methods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegatee
-
Method Details
-
query
to find the first component agent with the selector in this query agent.- Parameters:
selector- the selector- Returns:
- the first component agent, null if not found
-
queryAll
to find the component agents with the selector in this query agent.- Parameters:
selector- the selector- Returns:
- the component agents
-
as
Try to get a instance of target class for this query agent, the target class is usually aOperationAgentor a nativeComponent
if it cannot get a instance of target class, it will throwAgentException.- Parameters:
clazz- class of specify operation.- Returns:
- operation object.
-
is
Can get a instance of target class for this query agent.- Parameters:
clazz- the class cast to.- Returns:
- true if can get a instance of target class
-