Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.OverrideMember Class Reference

Public Member Functions

 OverrideMember (int offset, int length, OverriddenMember superclassMember, List< OverriddenMember > interfaceMembers)
 
boolean equals (Object obj)
 
List< OverriddenMembergetInterfaceMembers ()
 
int getLength ()
 
int getOffset ()
 
OverriddenMember getSuperclassMember ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static OverrideMember fromJson (JsonObject jsonObject)
 
static List< OverrideMemberfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final OverrideMember[] EMPTY_ARRAY = new OverrideMember[0]
 
static final List< OverrideMemberEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A description of a member that overrides an inherited member.

@coverage dart.server.generated.types

Definition at line 32 of file OverrideMember.java.

Constructor & Destructor Documentation

◆ OverrideMember()

org.dartlang.analysis.server.protocol.OverrideMember.OverrideMember ( int  offset,
int  length,
OverriddenMember  superclassMember,
List< OverriddenMember interfaceMembers 
)
inline

Constructor for OverrideMember.

Definition at line 64 of file OverrideMember.java.

64 {
65 this.offset = offset;
66 this.length = length;
67 this.superclassMember = superclassMember;
68 this.interfaceMembers = interfaceMembers;
69 }

Member Function Documentation

◆ equals()

boolean org.dartlang.analysis.server.protocol.OverrideMember.equals ( Object  obj)
inline

Definition at line 72 of file OverrideMember.java.

72 {
73 if (obj instanceof OverrideMember) {
74 OverrideMember other = (OverrideMember) obj;
75 return
76 other.offset == offset &&
77 other.length == length &&
78 ObjectUtilities.equals(other.superclassMember, superclassMember) &&
79 ObjectUtilities.equals(other.interfaceMembers, interfaceMembers);
80 }
81 return false;
82 }
OverrideMember(int offset, int length, OverriddenMember superclassMember, List< OverriddenMember > interfaceMembers)

◆ fromJson()

static OverrideMember org.dartlang.analysis.server.protocol.OverrideMember.fromJson ( JsonObject  jsonObject)
inlinestatic

Definition at line 84 of file OverrideMember.java.

84 {
85 int offset = jsonObject.get("offset").getAsInt();
86 int length = jsonObject.get("length").getAsInt();
87 OverriddenMember superclassMember = jsonObject.get("superclassMember") == null ? null : OverriddenMember.fromJson(jsonObject.get("superclassMember").getAsJsonObject());
88 List<OverriddenMember> interfaceMembers = jsonObject.get("interfaceMembers") == null ? null : OverriddenMember.fromJsonArray(jsonObject.get("interfaceMembers").getAsJsonArray());
89 return new OverrideMember(offset, length, superclassMember, interfaceMembers);
90 }
static OverriddenMember fromJson(JsonObject jsonObject)

◆ fromJsonArray()

static List< OverrideMember > org.dartlang.analysis.server.protocol.OverrideMember.fromJsonArray ( JsonArray  jsonArray)
inlinestatic

Definition at line 92 of file OverrideMember.java.

92 {
93 if (jsonArray == null) {
94 return EMPTY_LIST;
95 }
96 ArrayList<OverrideMember> list = new ArrayList<OverrideMember>(jsonArray.size());
97 Iterator<JsonElement> iterator = jsonArray.iterator();
98 while (iterator.hasNext()) {
99 list.add(fromJson(iterator.next().getAsJsonObject()));
100 }
101 return list;
102 }
static final List< OverrideMember > EMPTY_LIST
static OverrideMember fromJson(JsonObject jsonObject)

◆ getInterfaceMembers()

List< OverriddenMember > org.dartlang.analysis.server.protocol.OverrideMember.getInterfaceMembers ( )
inline

The members inherited from interfaces that are overridden by the overriding member. The field is omitted if there are no interface members, in which case there must be a superclass member.

Definition at line 108 of file OverrideMember.java.

108 {
109 return interfaceMembers;
110 }

◆ getLength()

int org.dartlang.analysis.server.protocol.OverrideMember.getLength ( )
inline

The length of the name of the overriding member.

Definition at line 115 of file OverrideMember.java.

115 {
116 return length;
117 }

◆ getOffset()

int org.dartlang.analysis.server.protocol.OverrideMember.getOffset ( )
inline

The offset of the name of the overriding member.

Definition at line 122 of file OverrideMember.java.

122 {
123 return offset;
124 }

◆ getSuperclassMember()

OverriddenMember org.dartlang.analysis.server.protocol.OverrideMember.getSuperclassMember ( )
inline

The member inherited from a superclass that is overridden by the overriding member. The field is omitted if there is no superclass member, in which case there must be at least one interface member.

Definition at line 131 of file OverrideMember.java.

131 {
132 return superclassMember;
133 }

◆ hashCode()

int org.dartlang.analysis.server.protocol.OverrideMember.hashCode ( )
inline

Definition at line 136 of file OverrideMember.java.

136 {
137 HashCodeBuilder builder = new HashCodeBuilder();
138 builder.append(offset);
139 builder.append(length);
140 builder.append(superclassMember);
141 builder.append(interfaceMembers);
142 return builder.toHashCode();
143 }

◆ toJson()

JsonObject org.dartlang.analysis.server.protocol.OverrideMember.toJson ( )
inline

Definition at line 145 of file OverrideMember.java.

145 {
146 JsonObject jsonObject = new JsonObject();
147 jsonObject.addProperty("offset", offset);
148 jsonObject.addProperty("length", length);
149 if (superclassMember != null) {
150 jsonObject.add("superclassMember", superclassMember.toJson());
151 }
152 if (interfaceMembers != null) {
153 JsonArray jsonArrayInterfaceMembers = new JsonArray();
154 for (OverriddenMember elt : interfaceMembers) {
155 jsonArrayInterfaceMembers.add(elt.toJson());
156 }
157 jsonObject.add("interfaceMembers", jsonArrayInterfaceMembers);
158 }
159 return jsonObject;
160 }

◆ toString()

String org.dartlang.analysis.server.protocol.OverrideMember.toString ( )
inline

Definition at line 163 of file OverrideMember.java.

163 {
164 StringBuilder builder = new StringBuilder();
165 builder.append("[");
166 builder.append("offset=");
167 builder.append(offset + ", ");
168 builder.append("length=");
169 builder.append(length + ", ");
170 builder.append("superclassMember=");
171 builder.append(superclassMember + ", ");
172 builder.append("interfaceMembers=");
173 builder.append(StringUtils.join(interfaceMembers, ", "));
174 builder.append("]");
175 return builder.toString();
176 }

Member Data Documentation

◆ EMPTY_ARRAY

final OverrideMember [] org.dartlang.analysis.server.protocol.OverrideMember.EMPTY_ARRAY = new OverrideMember[0]
static

Definition at line 34 of file OverrideMember.java.

◆ EMPTY_LIST

final List<OverrideMember> org.dartlang.analysis.server.protocol.OverrideMember.EMPTY_LIST = Lists.newArrayList()
static

Definition at line 36 of file OverrideMember.java.


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