BrightSide Workbench Full Report + Source Code
org.turro.elephant.web.context.WebElement Class Reference

Public Member Functions

String getElementClass ()
 
void setElementClass (String elementClass)
 
String getRole ()
 
void setRole (String role)
 
Map< String, String > getAttributes ()
 
void setAttributes (Map< String, String > attributes)
 
boolean isEmpty ()
 
IElement getInstance (WebContext context)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 35 of file WebElement.java.

Member Function Documentation

◆ getAttributes()

Map<String, String> org.turro.elephant.web.context.WebElement.getAttributes ( )

Definition at line 56 of file WebElement.java.

56  {
57  return attributes;
58  }

◆ getElementClass()

String org.turro.elephant.web.context.WebElement.getElementClass ( )

Definition at line 40 of file WebElement.java.

40  {
41  return elementClass;
42  }

◆ getInstance()

IElement org.turro.elephant.web.context.WebElement.getInstance ( WebContext  context)

Definition at line 72 of file WebElement.java.

72  {
73  IElement element = isEmpty() ? null : (IElement) Reflections.of(elementClass).instance();
74  if(element == null) element = new DefaultElement();
75  AttributeSupport attribs = ((IManageable) element).getAttributes();
76  attributes.forEach((k, v) -> {
77  attribs.addAttribute(new AttributeItem("attrib:" + k, v, AttributeItem.STRING_ATTR, null));
78  });
79  return element;
80  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRole()

String org.turro.elephant.web.context.WebElement.getRole ( )

Definition at line 48 of file WebElement.java.

48  {
49  return role;
50  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.elephant.web.context.WebElement.isEmpty ( )

Definition at line 66 of file WebElement.java.

66  {
67  return Strings.isBlank(elementClass);
68  }
Here is the caller graph for this function:

◆ setAttributes()

void org.turro.elephant.web.context.WebElement.setAttributes ( Map< String, String >  attributes)

Definition at line 60 of file WebElement.java.

60  {
61  this.attributes = attributes;
62  }

◆ setElementClass()

void org.turro.elephant.web.context.WebElement.setElementClass ( String  elementClass)

Definition at line 44 of file WebElement.java.

44  {
45  this.elementClass = elementClass;
46  }

◆ setRole()

void org.turro.elephant.web.context.WebElement.setRole ( String  role)

Definition at line 52 of file WebElement.java.

52  {
53  this.role = role;
54  }

The documentation for this class was generated from the following file: