Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions Class Reference
Inheritance diagram for org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions:
org.dartlang.analysis.server.protocol.RefactoringOptions

Public Member Functions

 ExtractLocalVariableOptions (String name, boolean extractAll)
 
boolean equals (Object obj)
 
boolean extractAll ()
 
String getName ()
 
int hashCode ()
 
void setExtractAll (boolean extractAll)
 
void setName (String name)
 
JsonObject toJson ()
 
String toString ()
 
- Public Member Functions inherited from org.dartlang.analysis.server.protocol.RefactoringOptions
 RefactoringOptions ()
 

Static Public Member Functions

static ExtractLocalVariableOptions fromJson (JsonObject jsonObject)
 
static List< ExtractLocalVariableOptionsfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final ExtractLocalVariableOptions[] EMPTY_ARRAY = new ExtractLocalVariableOptions[0]
 
static final List< ExtractLocalVariableOptionsEMPTY_LIST = Lists.newArrayList()
 
- Static Public Attributes inherited from org.dartlang.analysis.server.protocol.RefactoringOptions
static final RefactoringOptions[] EMPTY_ARRAY = new RefactoringOptions[0]
 
static final List< RefactoringOptionsEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

@coverage dart.server.generated.types

Definition at line 30 of file ExtractLocalVariableOptions.java.

Constructor & Destructor Documentation

◆ ExtractLocalVariableOptions()

org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions.ExtractLocalVariableOptions ( String  name,
boolean  extractAll 
)
inline

Constructor for ExtractLocalVariableOptions.

Definition at line 51 of file ExtractLocalVariableOptions.java.

51 {
52 this.name = name;
53 this.extractAll = extractAll;
54 }

Member Function Documentation

◆ equals()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringOptions.

Definition at line 57 of file ExtractLocalVariableOptions.java.

57 {
58 if (obj instanceof ExtractLocalVariableOptions) {
59 ExtractLocalVariableOptions other = (ExtractLocalVariableOptions) obj;
60 return
61 ObjectUtilities.equals(other.name, name) &&
62 other.extractAll == extractAll;
63 }
64 return false;
65 }

◆ extractAll()

boolean org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions.extractAll ( )
inline

True if all occurrences of the expression within the scope in which the variable will be defined should be replaced by a reference to the local variable. The expression used to initiate the refactoring will always be replaced.

Definition at line 90 of file ExtractLocalVariableOptions.java.

90 {
91 return extractAll;
92 }

◆ fromJson()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringOptions.

Definition at line 67 of file ExtractLocalVariableOptions.java.

67 {
68 String name = jsonObject.get("name").getAsString();
69 boolean extractAll = jsonObject.get("extractAll").getAsBoolean();
70 return new ExtractLocalVariableOptions(name, extractAll);
71 }

◆ fromJsonArray()

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

Definition at line 73 of file ExtractLocalVariableOptions.java.

73 {
74 if (jsonArray == null) {
75 return EMPTY_LIST;
76 }
77 ArrayList<ExtractLocalVariableOptions> list = new ArrayList<ExtractLocalVariableOptions>(jsonArray.size());
78 Iterator<JsonElement> iterator = jsonArray.iterator();
79 while (iterator.hasNext()) {
80 list.add(fromJson(iterator.next().getAsJsonObject()));
81 }
82 return list;
83 }
static ExtractLocalVariableOptions fromJson(JsonObject jsonObject)

◆ getName()

String org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions.getName ( )
inline

The name that the local variable should be given.

Definition at line 97 of file ExtractLocalVariableOptions.java.

97 {
98 return name;
99 }

◆ hashCode()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringOptions.

Definition at line 102 of file ExtractLocalVariableOptions.java.

102 {
103 HashCodeBuilder builder = new HashCodeBuilder();
104 builder.append(name);
105 builder.append(extractAll);
106 return builder.toHashCode();
107 }

◆ setExtractAll()

void org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions.setExtractAll ( boolean  extractAll)
inline

True if all occurrences of the expression within the scope in which the variable will be defined should be replaced by a reference to the local variable. The expression used to initiate the refactoring will always be replaced.

Definition at line 114 of file ExtractLocalVariableOptions.java.

114 {
115 this.extractAll = extractAll;
116 }

◆ setName()

void org.dartlang.analysis.server.protocol.ExtractLocalVariableOptions.setName ( String  name)
inline

The name that the local variable should be given.

Definition at line 121 of file ExtractLocalVariableOptions.java.

121 {
122 this.name = name;
123 }

◆ toJson()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringOptions.

Definition at line 125 of file ExtractLocalVariableOptions.java.

125 {
126 JsonObject jsonObject = new JsonObject();
127 jsonObject.addProperty("name", name);
128 jsonObject.addProperty("extractAll", extractAll);
129 return jsonObject;
130 }

◆ toString()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringOptions.

Definition at line 133 of file ExtractLocalVariableOptions.java.

133 {
134 StringBuilder builder = new StringBuilder();
135 builder.append("[");
136 builder.append("name=");
137 builder.append(name + ", ");
138 builder.append("extractAll=");
139 builder.append(extractAll);
140 builder.append("]");
141 return builder.toString();
142 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 32 of file ExtractLocalVariableOptions.java.

◆ EMPTY_LIST

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

Definition at line 34 of file ExtractLocalVariableOptions.java.


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