Found 16938 results in 544 files, showing top 50 files (show more).
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
713:   const DeclRefExpr *Needle;
56:   class UnreachableCodeHandler : public reachable_code::Callback {
125: class LogicalErrorHandler : public CFGCallback {
183:     // Skip function calls which are qualified with a templated class.
708: /// ContainsReference - A visitor class to search for references to
711: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
718:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
719:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
730:     if (E == Needle)
1019:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1486: class UninitValsDiagReporter : public UninitVariablesHandler {
1598: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1870: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
244:   // templated classes.
1406:   // FIXME: Should we use a common classification enum and the same set of
android.googlesource.com/platform/external/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
591:   const DeclRefExpr *Needle;
62:   class UnreachableCodeHandler : public reachable_code::Callback {
121: class LogicalErrorHandler : public CFGCallback {
179:     // Skip function calls which are qualified with a templated class.
586: /// ContainsReference - A visitor class to search for references to
589: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
596:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
597:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
608:     if (E == Needle)
899:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1360: class UninitValsDiagReporter : public UninitVariablesHandler {
1472: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1742: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
259:   // templated classes.
1280:   // FIXME: Should we use a common classification enum and the same set of
android.googlesource.com/platform/superproject:external/clang/lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] Duplicate result
chromium.googlesource.com/native_client/pnacl-clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
579:   const DeclRefExpr *Needle;
63:   class UnreachableCodeHandler : public reachable_code::Callback {
122: class LogicalErrorHandler : public CFGCallback {
203:         // Skip function calls which are qualified with a templated class.
574: /// ContainsReference - A visitor class to search for references to
577: class ContainsReference : public EvaluatedExprVisitor<ContainsReference> {
582:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
584:       FoundReference(false), Needle(Needle) {}
595:     if (E == Needle)
888:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1325: class UninitValsDiagReporter : public UninitVariablesHandler {
1442: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1713: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
240:   // templated classes.
1251:   // FIXME: Should we use a common classification enum and the same set of
android.googlesource.com/platform/external/clang_35a:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
577:   const DeclRefExpr *Needle;
63:   class UnreachableCodeHandler : public reachable_code::Callback {
121: class LogicalErrorHandler : public CFGCallback {
192:         // Skip function calls which are qualified with a templated class.
572: /// ContainsReference - A visitor class to search for references to
575: class ContainsReference : public EvaluatedExprVisitor<ContainsReference> {
580:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
582:       FoundReference(false), Needle(Needle) {}
593:     if (E == Needle)
885:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1331: class UninitValsDiagReporter : public UninitVariablesHandler {
1454: class ThreadSafetyReporter : public clang::thread_safety::ThreadSafetyHandler {
1629: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
229:   // templated classes.
1254:   // FIXME: Should we use a common classification enum and the same set of
github.com/PolymerLabs/arcs-live:node_modules/grpc/node_modules/needle/README.md: [ master, ]
1: Needle
17: Callbacks not floating your boat? Needle got your back.
47: With only two real dependencies, Needle supports:
61: This makes Needle an ideal alternative for performing quick HTTP requests in Node, either for API interaction, downlo...(144 bytes skipped)...
99: As you can see, you can use Needle with Promises or without them. When using Promises or when a callback is passed, the response's bod...(179 bytes skipped)...
101: ...(19 bytes skipped)... passed, however, the buffering logic will be skipped but the response stream will still go through Needle's processing pipeline, so you get all the benefits of post-processing while keeping the streamishne...(25 bytes skipped)...
106: Depending on the response's Content-Type, Needle will either attempt to parse JSON or XML streams, or, if a text response was received, will ensure ...(41 bytes skipped)...
155: Except from the above, all of Needle's request methods return a Readable stream, and both `options` and `callback` are optional. If pass...(126 bytes skipped)...
174:   // if no http:// is found, Needle will automagically prepend it.
239: Now, if you set pass `json: true` among the options, Needle won't set your params as a querystring but instead send a JSON representation of your data through ...(97 bytes skipped)...
250: The [Readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable) object returned by the above request methods emits the following events, in additi...(73 bytes skipped)...
256: Emitted when the underlying [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest) emits a response event. This is after the connection is established and the hea...(146 bytes skipped)...
275: ...(74 bytes skipped)... data was consumed or an error ocurred somewhere in between. Unlike a regular stream's `end` event, Needle's `done` will be fired either on success or on failure, which is why the first argument may be an E...(28 bytes skipped)...
291: Emitted when an error ocurrs. This should only happen once in the lifecycle of a Needle request.
304:  - `agent`       : Uses an [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) of your choice, instead of the global, default one. Useful for tweaking the behaviour a...(80 bytes skipped)...
314: ...(182 bytes skipped)...p) errors on some servers that misbehave when receiving payloads of unknown size. Set it to `0` and Needle will get and set the stream's length for you, or leave unset for the default behaviour, which is no...(43 bytes skipped)...
321: ...(71 bytes skipped)...se bodies automagically. Defaults to `true`. You can also set this to 'xml' or 'json' in which case Needle will *only* parse the response if the content type matches.
336:  - `user_agent`: Sets the 'User-Agent' HTTP header. Defaults to `Needle/{version} (Node.js {node_version})`.
361:  - `follow_if_same_host`     : When true, Needle will only follow redirects that point to the same host as the original request. `false` by default....(0 bytes skipped)...
362:  - `follow_if_same_protocol` : When true, Needle will only follow redirects that point to the same protocol as the original request. `false` by defa...(4 bytes skipped)...
367: Yes sir, we have it. Needle includes a `defaults()` method, that lets you override some of the defaults for all future requests...(12 bytes skipped)...
376: This will override Needle's default user agent and 10-second timeout, and disable response parsing, so you don't need to pass...(38 bytes skipped)...
381: Since you can pass a custom HTTPAgent to Needle you can do all sorts of neat stuff. For example, if you want to use the [`tunnel`](https://github.c...(67 bytes skipped)...
395: Unless you're running an old version of Node (< 0.11.4), by default Needle won't set the Connection header on requests, yielding Node's default behaviour of keeping the conne...(118 bytes skipped)...
397: ...(82 bytes skipped)...ime from exiting, either because of a bug or 'feature' that was changed on 0.11.4. To overcome this Needle does set the 'Connection' header to 'close' on those versions, however this also means that making ...(62 bytes skipped)...
583: > `docker create --name Needle -v /app -w /app -v /app/node_modules -i node:argon`
github.com/PolymerLabs/arcs-live:node_modules/watchpack/node_modules/fsevents/node_modules/needle/README.md: [ master, ] Duplicate result
github.com/PolymerLabs/arcs-live:server/node_modules/fsevents/node_modules/needle/README.md: [ master, ]
1: Needle
17: Callbacks not floating your boat? Needle got your back.
47: With only two real dependencies, Needle supports:
61: This makes Needle an ideal alternative for performing quick HTTP requests in Node, either for API interaction, downlo...(144 bytes skipped)...
100: As you can see, you can use Needle with Promises or without them. When using Promises or when a callback is passed, the response's bod...(179 bytes skipped)...
102: ...(19 bytes skipped)... passed, however, the buffering logic will be skipped but the response stream will still go through Needle's processing pipeline, so you get all the benefits of post-processing while keeping the streamishne...(25 bytes skipped)...
107: Depending on the response's Content-Type, Needle will either attempt to parse JSON or XML streams, or, if a text response was received, will ensure ...(41 bytes skipped)...
156: Except from the above, all of Needle's request methods return a Readable stream, and both `options` and `callback` are optional. If pass...(126 bytes skipped)...
175:   // if no http:// is found, Needle will automagically prepend it.
240: Now, if you set pass `json: true` among the options, Needle won't set your params as a querystring but instead send a JSON representation of your data through ...(97 bytes skipped)...
251: The [Readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable) object returned by the above request methods emits the following events, in additi...(73 bytes skipped)...
257: Emitted when the underlying [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest) emits a response event. This is after the connection is established and the hea...(146 bytes skipped)...
276: ...(74 bytes skipped)... data was consumed or an error ocurred somewhere in between. Unlike a regular stream's `end` event, Needle's `done` will be fired either on success or on failure, which is why the first argument may be an E...(28 bytes skipped)...
292: Emitted when an error ocurrs. This should only happen once in the lifecycle of a Needle request.
305:  - `agent`       : Uses an [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) of your choice, instead of the global, default one. Useful for tweaking the behaviour a...(80 bytes skipped)...
315: ...(182 bytes skipped)...p) errors on some servers that misbehave when receiving payloads of unknown size. Set it to `0` and Needle will get and set the stream's length for you, or leave unset for the default behaviour, which is no...(43 bytes skipped)...
321: ...(71 bytes skipped)...se bodies automagically. Defaults to `true`. You can also set this to 'xml' or 'json' in which case Needle will *only* parse the response if the content type matches.
336:  - `user_agent`: Sets the 'User-Agent' HTTP header. Defaults to `Needle/{version} (Node.js {node_version})`.
361:  - `follow_if_same_host`     : When true, Needle will only follow redirects that point to the same host as the original request. `false` by default....(0 bytes skipped)...
362:  - `follow_if_same_protocol` : When true, Needle will only follow redirects that point to the same protocol as the original request. `false` by defa...(4 bytes skipped)...
367: Yes sir, we have it. Needle includes a `defaults()` method, that lets you override some of the defaults for all future requests...(12 bytes skipped)...
376: This will override Needle's default user agent and 10-second timeout, and disable response parsing, so you don't need to pass...(38 bytes skipped)...
381: Since you can pass a custom HTTPAgent to Needle you can do all sorts of neat stuff. For example, if you want to use the [`tunnel`](https://github.c...(67 bytes skipped)...
395: Unless you're running an old version of Node (< 0.11.4), by default Needle won't set the Connection header on requests, yielding Node's default behaviour of keeping the conne...(118 bytes skipped)...
397: ...(82 bytes skipped)...ime from exiting, either because of a bug or 'feature' that was changed on 0.11.4. To overcome this Needle does set the 'Connection' header to 'close' on those versions, however this also means that making ...(62 bytes skipped)...
583: > `docker create --name Needle -v /app -w /app -v /app/node_modules -i node:argon`
github.com/PolymerLabs/arcs-live:server/node_modules/grpc/node_modules/needle/README.md: [ master, ] Duplicate result
github.com/google/rekall:rekall-gui/manuskript/static/bower_components/markdown/test/fixtures/Markdown-from-MDTest1.1.mdtest/Markdown_Documentation_-_Syntax.json: [ master, ]
15:         "class": "selected",
264:     ["pre", ["code", "    <div class=\"footer\">\u000a        &copy; 2004 Foo Corporation\u000a    </div>\u000a"]],
266:     ["pre", ["code", "<pre><code>&lt;div class=\"footer\"&gt;\u000a    &amp;copy; 2004 Foo Corporation\u000a&lt;/div&gt;\u000a</code></pre>\u000a"...(3 bytes skipped)...
149:     ["p", "in your anchor tag ", ["code", "href"], " attribute. Needless to say, this is easy to\u000aforget, and is probably the single most common source of HTML valida...(58 bytes skipped)...
chromium.googlesource.com/native_client/nacl-gdb:sim/common/sim-fpu.h: [ master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
chromium.googlesource.com/native_client/nacl-toolchain:gdb/sim/common/sim-fpu.h: [ master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
github.com/hanwen/artisjokke:needle2d/needle-inserter.hh: [ master, ]
13: class Needle_inserter : public Deformation_hook
2:   declare Needle_inserter
54:   Needle_inserter (Maubach_tree*, Deformation_state*);
github.com/hanwen/artisjokke:needle3d/needle-inserter3.hh: [ master, ]
10: class Needle_inserter3 : public Deformation_hook,  public Element_watcher
12:   enum Needle_state {
16:   Needle_state state_;
55:   Needle_inserter3 (Maubach_tree3*, Deformation_state*);
kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux:drivers/char/xillybus/xillybus_core.c: [ master, ]
61: static struct class *xillybus_class;
1843: 		device = device_create(xillybus_class,
1865: 		device_destroy(xillybus_class, MKDEV(major, i));
1881: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2082: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2083: 	if (IS_ERR(xillybus_class))
2084: 		return PTR_ERR(xillybus_class);
2088: 		class_destroy(xillybus_class);
2100: 	class_destroy(xillybus_class);
81:  * They are held for short direct memory manipulations. Needless to say,
github.com/google/kmsan:drivers/char/xillybus/xillybus_core.c: [ master, ] Duplicate result
github.com/google/capsicum-linux:drivers/char/xillybus/xillybus_core.c: [ capsicum, ]
64: static struct class *xillybus_class;
1846: 		device = device_create(xillybus_class,
1868: 		device_destroy(xillybus_class, MKDEV(major, i));
1884: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2085: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2086: 	if (IS_ERR(xillybus_class))
2087: 		return PTR_ERR(xillybus_class);
2091: 		class_destroy(xillybus_class);
2103: 	class_destroy(xillybus_class);
84:  * They are held for short direct memory manipulations. Needless to say,
github.com/google/ktsan:drivers/char/xillybus/xillybus_core.c: [ tsan, ]
64: static struct class *xillybus_class;
1844: 		device = device_create(xillybus_class,
1866: 		device_destroy(xillybus_class, MKDEV(major, i));
1882: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2083: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2084: 	if (IS_ERR(xillybus_class))
2085: 		return PTR_ERR(xillybus_class);
2089: 		class_destroy(xillybus_class);
2101: 	class_destroy(xillybus_class);
84:  * They are held for short direct memory manipulations. Needless to say,
github.com/google/error-prone:check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java: [ master, ]
33: public final class NeedlemanWunschEditDistance {
35:   private NeedlemanWunschEditDistance() {
23:  * The Needleman-Wunsch algorithm for finding least-cost string edit distances between pairs of
29:  * <p>See http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm
github.com/google/error-prone:check_api/src/test/java/com/google/errorprone/names/NeedlemanWunschEditDistanceTest.java: [ master, ]
27: public class NeedlemanWunschEditDistanceTest {
26: @RunWith(JUnit4.class)
25: /** Tests for NeedlemanWunschEditDistance */
34:         NeedlemanWunschEditDistance.getEditDistance(
47:         NeedlemanWunschEditDistance.getEditDistance(
62:         NeedlemanWunschEditDistance.getWorstCaseEditDistance(
github.com/gwtproject/gwt:user/test/com/google/gwt/uibinder/test/client/NeedlesslyAnnotatedLabel.java: [ master, ]
25: public class NeedlesslyAnnotatedLabel extends Label {
26:   @UiConstructor public NeedlesslyAnnotatedLabel() {
gwt.googlesource.com/gwt:user/test/com/google/gwt/uibinder/test/client/NeedlesslyAnnotatedLabel.java: [ master, ] Duplicate result
github.com/apache/kudu:www/epoch.0.5.2.min.js: [ master, ]
78: return this.drawNeedle()}};d.prototype.drawNeedle=function(){var c,a,d;d=[this.centerX(),this.centerY(),this.radius()];c=d[0];a=d[1];d=d[2];this.setS...(357 bytes skipped)...
24: ...(118 bytes skipped)...s.rightAxis())};d.prototype._drawAxes=function(){this.hasAxis("bottom")&&this.svg.append("g").attr("class...(48 bytes skipped)..., "+this.innerHeight()+")").call(this.bottomAxis());this.hasAxis("top")&&this.svg.append("g").attr("class","x axis top").call(this.topAxis());this.hasAxis("left")&&this.svg.append("g").attr("class","y axis left").call(this.leftAxis());
25: this.hasAxis("right")&&this.svg.append("g").attr("class","y axis right").attr("transform","translate("+this.innerWidth()+", 0)").call(this.rightAxis());ret...(64 bytes skipped)...
28: a.enter().append("g").attr("class",function(a){return a.className});a.append("path").attr("class","area").attr("d",function(a){return c(a.values)});return e.__super__.draw.call(this)};return e}(Ep...(29 bytes skipped)...
34: function(a){return"translate("+e(a.group)+", 0)"});a.enter().append("g").attr("class...(246 bytes skipped)...r("width",f.rangeBand()).attr("height",function(a){return c-t(a.y)});d.enter().append("rect").attr("class",function(a){return a.className}).attr("x",function(a){return f(a.label)}).attr("y",
36: e(a.group)+")"});a.enter().append("g").attr("class...(239 bytes skipped)...ttr("height",f.rangeBand()).attr("width",function(a){return d(a.y)});c.enter().append("rect").attr("class",function(a){return a.className}).attr("x",function(a){return 0}).attr("y",function(a){return f(a.label)}).attr("height",
39: ...(118 bytes skipped)...").transition().duration(500).attr("d",function(c){return a(c.values)});c.enter().append("g").attr("class",function(a){return a.className}).append("path").attr("class","line").attr("d",function(c){return a(c.values)});c.exit().transition().duration(750).style("opaci...(95 bytes skipped)...
41: ...(228 bytes skipped)...l(".arc").data(this.pie(this.data),function(a){return a.data.category});c.enter().append("g").attr("class",function(a){return"arc pie "+a.data.className});c.select("path").attr("d",this.arc);c.select("text").attr("transform",function(c){return"tran...(26 bytes skipped)...
44: ...(30 bytes skipped)....svg.selectAll(".layer").data(this.data,function(a){return a.category});a.enter().append("g").attr("class",function(a){return a.class...(102 bytes skipped)...,function(a){return h(a.x)}).attr("cy",function(a){return e(a.y)});c.enter().append("circle").attr("class","dot").attr("r",this.options.radius).attr("cx",function(a){return h(a.x)}).attr("cy",function(a){r...(67 bytes skipped)...
50: ...(102 bytes skipped)...Axes=function(){var a,c,d,e,f;this.hasAxis("bottom")&&(a=this.bottomAxis=this.svg.append("g").attr("class...(65 bytes skipped)...gins.left-1)+", "+(this.innerHeight()/this.pixelRatio+this.margins.top)+")"),a.append("path").attr("class...(33 bytes skipped)...s.innerWidth()/this.pixelRatio+1)));this.hasAxis("top")&&(a=this.topAxis=this.svg.append("g").attr("class",
51: ...(23 bytes skipped)...tr("transform","translate("+(this.margins.left-1)+", "+this.margins.top+")"),a.append("path").attr("class","domain").attr("d","M0,0H"+(this.innerWidth()/this.pixelRatio+1)));e=this.options.ticks.time;this....(287 bytes skipped)...
52: function(){this.hasAxis("left")&&this.svg.append("g").attr("class...(77 bytes skipped)...s.margins.top+")").call(this.leftAxis());if(this.hasAxis("right"))return this.svg.append("g").attr("class","y axis right").attr("transform","translate("+(this.width-this.margins.right)+", "+this.margins.to...(189 bytes skipped)...
59: ...(266 bytes skipped)...),opacity:d?0:1,enter:d?!0:!1,exit:!1},this.hasAxis("bottom")&&(a=this.bottomAxis.append("g").attr("class","tick major").attr("transform","translate("+(c.x+1)+",0)").style("opacity",c.opacity),a.append("li...(54 bytes skipped)...
60: ...(50 bytes skipped)...ats.bottom(c.time)),c.bottomEl=jQuery(a[0])),this.hasAxis("top")&&(a=this.topAxis.append("g").attr("class","tick major").attr("transform","translate("+(c.x+1)+",0)").style("opacity",c.opacity),a.append("li...(258 bytes skipped)...
73: ...(22 bytes skipped)...s.el.get(0)).insert("svg",":first-child").attr("width",this.width).attr("height",this.height).attr("class...(87 bytes skipped)....append("g").attr("transform","translate("+this.textX()+", "+this.textY()+")").append("text").attr("class","value").text(this.options.format(this.value));this.animation={interval:null,active:!1,delta:0,tar...(97 bytes skipped)...
2: ...(399 bytes skipped)...ice(0,h)],a.slice(h+1)):d.createElement(a));if(f)if("$"==y&&(y=m[++z]),"#"==f)p.id=y;else if(l=(a=p.className)&&
3: (" "+a+" ").replace(" "+y+" "," "),"."==f)p.class...(57 bytes skipped)...v",p,"<").innerHTML="":(A=p.parentNode)&&A.removeChild(p)}else l=l.substring(1,l.length-1),l!=a&&(p.className=l);k&&("$"==w&&(w=m[++z]),"style"==k?p.style.cssText=w:(f="!"==k.charAt(0)?(k=k.substring(1))&&...(191 bytes skipped)...
13: ...(14 bytes skipped)...=["layer"],h.push("category"+c),d.category=c,null!=d.label&&h.push(Epoch.Util.dasherize(d.label)),d.className=h.join(" "),c++;return this.data=a};a.prototype.update=function(a,c){null==c&&(c=!0);this.setDa...(294 bytes skipped)...
17: ...(397 bytes skipped)...=f.length;q<p;q++)l=f[q],n=l.tagName.toLowerCase(),null!=l.id&&0<l.id.length&&(n+="#"+l.id),null!=l.className&&
18: 0<l.className.length&&(n+="."+jQuery.trim(l.className).replace(/\s+/g,".")),d.push(n);d.push("svg");q=jQuery.trim(a).split(/\s+/);f=0;for(n=q.length;...(295 bytes skipped)...
32: ...(276 bytes skipped)...ion(){var a,c,d,e,f,t,l,y,n,q,p,k;f={};p=this.data;t=0;for(y=p.length;t<y;t++)for(e=p[t],a="bar "+e.className.replace(/\s*layer\s*/,""),k=e.values,l=0,n=k.length;l<n;l++)c=k[l],null==f[q=c.x]&&(f[q]=[]),f[...(28 bytes skipped)...
33: y:c.y,className:a});c=[];for(d in f)a=f[d],c.push({group:d,values:a});return c};d.prototype.draw=function(){"ho...(405 bytes skipped)...
49: ...(387 bytes skipped)...(c),c=["layer"],c.push("category"+((e|0)+1)),null!=f.label&&c.push(Epoch.Util.dasherize(f.label)),d.className=c.join(" "),
65: ...(249 bytes skipped)... k=e.__super__.constructor.apply(this,arguments)}f(e,d);e.prototype.setStyles=function(c){c=null!=c.className?this.getStyles("g."+c.className.replace(/\s/g,".")+" path.area"):this.getStyles("g path.area");this.ctx.fillStyle=c.fill;null!=...(32 bytes skipped)...
70: ...(286 bytes skipped)...A[0];p=A[1];x=this.data;B=[];A=0;for(z=x.length;A<z;A++)n=x[A],0<n.values.length&&(this.setStyles(n.className),w=[this.options.windowSize,n.values.length,this.inTransition()],t=w[0],k=w[1],l=(q=w[2])?-1:0,...(24 bytes skipped)...
86: ...(9 bytes skipped)...e<n;e++){q=p[e];l=q.values[a];z=l.buckets;for(d in z)f=z[d],B[d]+=f;C+=l.max;f=this.getStyles("."+q.className.split(" ").join(".")+" rect.bucket");l.color=f.fill;k.push(l)}q=c*A;this.p.clearRect(q,0,A,this...(302 bytes skipped)...
90: ...(272 bytes skipped)...0];m=d[1];q=this.data;p=[];y=0;for(n=q.length;y<n;y++)if(f=q[y],0<f.values.length){this.setStyles(f.className);this.ctx.beginPath();k=[this.options.windowSize,f.values.length,this.inTransition()];d=k[0];e=...(25 bytes skipped)...
github.com/googleglass/gdk-compass-sample:app/src/main/java/com/google/android/glass/sample/compass/CompassView.java: [ master, ]
341:     private void drawNeedle(Canvas canvas, boolean bottom) {
50: public class CompassView extends View {
217:         drawNeedle(canvas, false);
218:         drawNeedle(canvas, true);
github.com/bazelbuild/bazel:src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java: [ master, ]
142:   private Artifact classJar;
79:  * A helper class for android rules.
84: public class AndroidCommon {
189:         AnalysisUtils.getProviders(deps, AndroidNeverLinkLibrariesProvider.class)) {
196:           JavaInfo.getProvidersFromListOfTargets(JavaCompilationArgsProvider.class, deps)) {
368:       // Needle index is exhausted, so the needle must match.
403:         ruleContext.isLegalFragment(AndroidConfiguration.class)
404:             && ruleContext.getFragment(AndroidConfiguration.class).getExportsManifestDefault();
423:     // The resource class JAR should already have been generated.
433:     // We don't actually use the ijar. That is almost the same as the resource class jar
477:                       .getProvider(FileProvider.class)
722:             .addProvider(JavaCompilationArgsProvider.class, compilationArgsProvider)
723:             .addProvider(JavaRuleOutputJarsProvider.class, ruleOutputJarsProvider)
724:             .addProvider(JavaSourceJarsProvider.class, sourceJarsProvider)
725:             .addProvider(JavaPluginInfoProvider.class, JavaCommon.getTransitivePlugins(ruleContext))
732:             .getFragment(AndroidConfiguration.class)
749:         .addProvider(RunfilesProvider.class, RunfilesProvider.simple(getRunfiles()))
793:                 .getFragment(AndroidConfiguration.class)
869:     return context.getConfiguration().getFragment(AndroidConfiguration.class);
935:       FileProvider fileProvider = dep.getProvider(FileProvider.class);
952:    * into the same classloader. If the same class exists in both jars, there will be runtime
955:    * <p>R.class files that share the same package are also filtered out to prevent
970:             .addFileTypeToFilter(".class")
974:             .addExplicitFilter("/BR\\.class$")
975:             .addExplicitFilter("/databinding/[^/]+Binding\\.class$");
977:       builder.addExplicitFilter("R\\.class").addExplicitFilter("R\\$.*\\.class");
98:       RuleContext ruleContext, Mode mode, final Class<T> classType) {
103:         builder.add(ruleContext.getPrerequisites(attr, mode, classType));
210:       Artifact classesDex,
232:     commandLine.addPrefixedExecPath("--output=", classesDex);
240:             .addOutput(classesDex)
430:     // Add the compiled resource jar to the classpath of the main compilation.
432:     // Add the compiled resource jar to the classpath of consuming targets.
467:     classJar = ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_LIBRARY_CLASS_JAR);
468:     idlHelper = new AndroidIdlHelper(ruleContext, classJar);
527:       // Combined resource constants needs to come even before our own classes that may contain
564:     this.jarsProducedForRuntime = jarsProducedForRuntime.add(classJar).build();
606:       // We only want to add a jar to the classpath of a dependent rule if it has content.
607:       javaArtifactsBuilder.addRuntimeJar(classJar);
608:       jar = classJar;
611:     filesBuilder.add(classJar);
613:     manifestProtoOutput = helper.createManifestProtoOutput(classJar);
618:       genClassJar = helper.createGenJar(classJar);
619:       genSourceJar = helper.createGensrcJar(classJar);
620:       helper.createGenJarAction(classJar, manifestProtoOutput, genClassJar);
629:     nativeHeaderOutput = helper.createNativeHeaderJar(classJar);
632:         helper.createCompileAction(classJar, manifestProtoOutput, genSourceJar, nativeHeaderOutput);
686:     idlHelper.addTransitiveInfoProviders(builder, classJar, manifestProtoOutput);
704:             .addOutputJar(classJar, iJar, manifestProtoOutput, ImmutableList.of(srcJar))
714:         builder, javaInfoBuilder, filesToBuild, classJar, ANDROID_COLLECTION_SPEC);
807:    * Returns Jars produced by this rule that may go into the runtime classpath. By contrast {@link
808:    * #getRuntimeJars()} returns the complete runtime classpath needed by this rule, including
816:     return classJar;
950:    * Used for instrumentation tests. Filter out classes from the instrumentation JAR that are also
470:     ImmutableList<Artifact> bootclasspath;
472:       bootclasspath =
476:                       .getPrerequisite("$desugar_java8_extra_bootclasspath", Mode.HOST)
482:       bootclasspath =
494:             .setBootClassPath(bootclasspath);
661:             helper.getBootclasspathOrDefault()));
android.googlesource.com/platform/external/jetbrains/jdk8u_nashorn:docs/JavaScriptingProgrammersGuide.html: [ master, ]
477: <a name="jsjavaclass" id=jsjavalass"></a>
26: <html class=" regenabled  gecko radius jsenabled regloaded" xmlns="http://www.w3.org/1999/xhtml"><head>
37: <div id="sharepage" class="smallpagetitle"><h1>Java Scripting Programmer's Guide</h1><div class="sharepage">		<div class...(272 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(146 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(213 bytes skipped)...guides%2Fscripting%2Fprogrammer_guide%2Findex.html;title=Java%20Scripting%20Programmer%27s%20Guide" class...(211 bytes skipped)...es%2Fscripting%2Fprogrammer_guide%2Findex.html&amp;title=Java%20Scripting%20Programmer%27s%20Guide" class...(198 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink slashdot" title="Submit this page to Slashdot"></a></td>		<td id="share-blank"> </td></t...(36 bytes skipped)...
132: of the scripting API is the <code>ScriptEngineManager</code> class.
168: public class EvalScript {
171:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
173:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
175:         engine.<span class="methodref">eval</span>("print('Hello, World')");
194: public class EvalFile {
197:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
199:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
201:         engine.<span class="methodref">eval</span>(new java.io.FileReader(args[0]));
246: public class ScriptVars { 
253:         engine.<span class="methodref">put</span>("file", f);
277: public class InvokeScriptFunction {
290:         <span class="classref">Invocable</span> inv = (Invocable) engine;
293:         inv.<span class="methodref">invokeFunction</span>("hello", "Scripting!!" );
307: public class InvokeScriptMethod {
321:         <span class="classref">Invocable</span> inv = (Invocable) engine;
324:         Object obj = engine.<span class="methodref">get</span>("obj");
327:         inv.<span class="methodref">invokeMethod</span>(obj, "hello", "Script Method !!" );
348: public class RunnableImpl {
359:         <span class="classref">Invocable</span> inv = (Invocable) engine;
363:         Runnable r = inv.<span class="methodref">getInterface</span>(Runnable.class);
384: public class RunnableImplObject {
396:         Object obj = engine.<span class="methodref">get</span>("obj");
398:         <span class="classref">Invocable</span> inv = (Invocable) engine;
402:         Runnable r = inv.<span class="methodref">getInterface</span>(obj, Runnable.class);
434: public class MultiScopes {
445:         <span class="classref">ScriptContext</span> newContext = new <span class="classref">SimpleScriptContext</span>();
447:         <span class="classref">Bindings</span> engineScope = newContext.<span class="methodref">getBindings</span>(ScriptContext.ENGINE_SCOPE);
450:         engineScope.<span class="methodref">put</span>("x", "world");
504: In the special case of inner classes, you can either use the JVM fully qualified name, meaning using the dollar sign in the class name, or you can use the dot:
516: ...(2 bytes skipped)...th work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name as it is originally specified, and the internal JVM names for inner class...(167 bytes skipped)... matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads the class...(8 bytes skipped)... out of all dots in the name. This way it can correctly resolve and load even multiply nested inner class...(33 bytes skipped)...this will be slower than using the dollar signs in the name. An alternative way to access the inner class is as a property of the outer class:
523: You can access both static and non-static inner classes. If you want to create an instance of a non-static inner class, remember to pass an instance of its outer class as the first argument to the constructor.
536: ...(64 bytes skipped)...rom a <code>java.lang.Class</code> object. You can obtain one from the other using properties <code>class</code> and <code>static</code> on them.
545:  print("Type's `class` property is same as instance getClass(): " + (a.getClass() === ArrayList.class))
549: You can think of the type object as similar to the class names as used in Java source code: you use them as the
553: between compile-time class expressions and runtime class objects also exists. (Also, Java can't have the equivalent of <code>static</code>
554: property on a <code>Class</code> object since compile-time class expressions are never reified as objects).
570: <span class="functionref">importPackage</span>(java.awt);
572: <span class="functionref">importClass</span>(java.awt.Frame);
581: <p>The <span class="objectref">Packages</span> global variable can
593: avoid that, you may use <span class="functionref">JavaImporter</span>.</p>
600: var SwingGui = new <span class="functionref">JavaImporter</span>(javax.swing,
660: Java anonymous class-like syntax:</p>
695: If a Java class is abstract, you can instantiate an anonymous subclass of it using an argument list that is applicable to any of its public or protected constructors, but...(230 bytes skipped)...
713: which is very similar to Java anonymous inner class definition. On the other hand, if the type is an abstract type with a single abstract method (commo...(210 bytes skipped)...
720: Note that in every one of these cases if you are trying to instantiate an abstract class that has constructors that take some arguments, you can invoke those simply by specifying the argum...(57 bytes skipped)...
736: To extend a concrete Java class, you have to use <code>Java.extend</code> function.
737: <code>Java.extend</code> returns a type object for a subclass of the specified Java class (or implementation of the specified interface) that acts as a script-to-Java adapter for it.  
775: ...(2 bytes skipped)...ode>Java.extend</code> can in fact take a list of multiple types. At most one of the types can be a class, and the rest must
776: be interfaces (the class doesn't have to be the first in the list). You will get back an object that extends the class and 
777: implements all the interfaces. (Obviously, if you only specify interfaces and no class, the object will extend <code>java.lang.Object</code>).
785: to the actual instance being created with <code>new</code>, and not to the whole class. This has some advantages, for example in the
787: ...(8 bytes skipped)...ty, the below code shows that different instantiations of, say, <code>Runnable</code> have the same class regardless of them having
796: print("We share the same class: " + (r1.class === r2.class))
804: We share the same class: true
807: Sometimes, however, you'll want to extend a Java class or implement an interface with implementation bound to the class, not to
808: its instances. Such a need arises, for example, when you need to pass the class for instantiation to an external API; prime example
809: of this is the JavaFX framework where you need to pass an Application class to the FX API and let it instantiate it.
813: denoting a class to extend and interfaces to implement &ndash; can also take one last argument that has to be a Java...(13 bytes skipped)...
814: ...(6 bytes skipped)...erves as the implementation for the methods. In this case, <code>Java.extend()</code> will create a class that has the same
815: constructors as the original class had, as they don't need to take an an extra implementation object parameter. The example below
816: shows how you can create class-bound implementations, and shows that in this case, the implementation classes for different invocations
826: print("We share the same class: " + (r1.class === r2.class))
834: We share the same class: false
839: the implementations are bound to a class, the two classes obviously can't be the same, and we indeed see that the two runnables no
840: longer share the same class &ndash; every invocation of <code>Java.extend()</code> with a class-specific implementation object triggers
841: the creation of a new Java adapter class.
844: Finally, the adapter classes with class-bound implementations can <i>still</i> take an additional constructor parameter to further
846: in a class-based JavaScript implementation object passed to <code>Java.extend</code>, and part in another obje...(29 bytes skipped)...
847: ...(0 bytes skipped)...Whatever functions are provided by the constructor-passed object will override the functions in the class-bound object.
855: print("We share the same class: " + (r1.class === r2.class))
863: We share the same class: true
891: Note that you normally don't even have to use qualified class names in 
897: class.
929: end up with an object of private engine implementation class that implements <code>CharSequence</code> but is not a Java String.
938: abstract class <code>javax.script.AbstractScriptEngine</code>
957: <div class="hr"><hr></div>
973: <div class="hr"><hr></div>
66: <li><span><a href="#jsjavaclass">Accessing Java
80: <li><span><a href="#classBoundImplementations">Class-Bound Implementations
161: Needless to say, you have to handle the exceptions
468: <p>For the most part, accessing Java classes, objects and methods
527: static fields and methods of the classes:
561: classes.</p>
564: // <a href="source/importpackageclass.js">importpackageclass.js</a>
568: // Import Java packages and classes 
587: platform classes can be accessed without the "Packages" prefix.</p>
598: // create JavaImporter with specific packages and classes to import
606:     // classes by unqualified (simple) names.
730: ...(35 bytes skipped)... expects a <code>TimerTask</code> as its argument, so Nashorn creates an instance of a TimerTask subclass and uses the passed function to implement its only abstract method, run(). In this usage though, yo...(130 bytes skipped)...
760: The reason you must use <code>Java.extend()</code> with concrete classes is that with concrete classes, there can be a 
767: If we allowed subclassing of concrete classes with constructor syntax, Nashorn couldn't tell if you're creating a new 
779: <a name="classBoundImplementations" id="classBoundImplementations"></a>
782: The methods shown so far for extending Java classes and implementing interfaces &ndash; passing an implementation JavaScript object 
783: ...(6 bytes skipped)...ction to a constructor, or using <code>Java.extend</code> with <code>new</code> &ndash; all produce classes that take an
768: <code>Thread</code> and passing it a <code>Runnable</code> at this point, or you are subclassing <code>Thread</code> and
github.com/chromium/chromium:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ]
266: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
348: class MouseLockModule : public pp::Module {
216:   DrawNeedle(&image, kForegroundColor);
269:     Log("DrawNeedle with NULL image");
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
github.com/GoogleCloudPlatform/IoT-Icebreaker:appengine/sensordata-to-ui/public/third_party/epoch/epoch.js: [ master, ]
3412:   Gauge.prototype.drawNeedle = function() {
1661:       this.g.append("g").attr("class", "x axis bottom").attr("transform", "translate(0, " + (this.innerHeight()) + ")").call(this.bottom...(8 bytes skipped)...
1664:       this.g.append("g").attr('class', 'x axis top').call(this.topAxis());
1667:       this.g.append("g").attr("class", "y axis left").call(this.leftAxis());
1670:       this.g.append('g').attr('class', 'y axis right').attr('transform', "translate(" + (this.innerWidth()) + ", 0)").call(this.rightAxi...(5 bytes skipped)...
1802:     layer.enter().append('g').attr('class', function(d) {
1805:     layer.append('path').attr('class', 'area').attr('d', function(d) {
1985:     layer.enter().append("g").attr('class', 'layer').attr("transform", function(d) {
1991:     rects.attr('class', function(d) {
2001:     rects.enter().append('rect').attr('class', function(d) {
2026:     layer.enter().append("g").attr('class', 'layer').attr("transform", function(d) {
2032:     rects.attr('class', function(d) {
2042:     rects.enter().append('rect').attr('class', function(d) {
2270:     layer.enter().append('g').attr('class', function(l) {
2272:     }).append('path').attr('class', 'line').attr('d', (function(_this) {
2326:     arcs.enter().append('g').attr('class', function(d) {
2393:     layer.enter().append('g').attr('class', function(d) {
2407:     dots.enter().append('circle').attr('class', 'dot').attr("r", function(d) {
2582:       axis = this.bottomAxis = this.svg.append('g').attr('class', "x axis bottom canvas").attr('transform', "translate(" + (this.margins.left - 1) + ", " + (this.i...(58 bytes skipped)...
2583:       axis.append('path').attr('class', 'domain').attr('d', "M0,0H" + (this.innerWidth() / this.pixelRatio + 1));
2586:       axis = this.topAxis = this.svg.append('g').attr('class', "x axis top canvas").attr('transform', "translate(" + (this.margins.left - 1) + ", " + this.margi...(14 bytes skipped)...
2587:       axis.append('path').attr('class', 'domain').attr('d', "M0,0H" + (this.innerWidth() / this.pixelRatio + 1));
2623:       this.svg.append("g").attr("class", "y axis left").attr('transform', "translate(" + (this.margins.left - 1) + ", " + this.margins.top...(30 bytes skipped)...
2626:       return this.svg.append('g').attr('class', 'y axis right').attr('transform', "translate(" + (this.width - this.margins.right) + ", " + this....(42 bytes skipped)...
2844:       g = this.bottomAxis.append('g').attr('class', 'tick major').attr('transform', "translate(" + (tick.x + 1) + ",0)").style('opacity', tick.opacit...(3 bytes skipped)...
2850:       g = this.topAxis.append('g').attr('class', 'tick major').attr('transform', "translate(" + (tick.x + 1) + ",0)").style('opacity', tick.opacit...(3 bytes skipped)...
3297: ...(13 bytes skipped)...= this.el.insert('svg', ':first-child').attr('width', this.width).attr('height', this.height).attr('class', 'gauge-labels');
3302: ...(25 bytes skipped)...attr('transform', "translate(" + (this.textX()) + ", " + (this.textY()) + ")").append('text').attr('class', 'value').text(this.options.format(this.value));
585:     var category, classes, i, layer, len;
589:       classes = ['layer'];
590:       classes.push("category" + category);
594:         classes.push(Epoch.Util.dasherize(layer.label));
596:       layer.className = classes.join(' ');
872:     var classNames, element, id, match, tag, whole;
877:     whole = match[0], tag = match[1], id = match[2], classNames = match[3];
883:     if (classNames != null) {
884:       element.className = classNames.substr(1).replace(/\./g, ' ');
945:       if ((element.className != null) && element.className.length > 0) {
946:         sel += '.' + Epoch.Util.trim(element.className).replace(/\s+/g, '.');
1803:       return d.className;
1933:     var className, entry, j, k, l, layer, len, len1, map, name, ref, ref1, results, v;
1938:       className = 'bar ' + layer.className.replace(/\s*layer\s*/, '');
1948:           className: className
1992:       return d.className;
2002:       return d.className;
2033:       return d.className;
2043:       return d.className;
2271:       return l.className;
2327:       return "arc pie " + d.data.className;
2394:       return d.className;
2555:     var classes, copy, data, i, layer, start;
2563:       classes = ['layer'];
2564:       classes.push("category" + ((i | 0) + 1));
2566:         classes.push(Epoch.Util.dasherize(layer.label));
2568:       copy.className = classes.join(' ');
3089:     if ((layer != null) && (layer.className != null)) {
3090:       styles = this.getStyles("g." + (layer.className.replace(/\s/g, '.')) + " path.area");
3209:   Bar.prototype.setStyles = function(className) {
3211:     styles = this.getStyles("rect.bar." + (className.replace(/\s/g, '.')));
3236:       this.setStyles(layer.className);
3408:     this.drawNeedle();
3668:       styles = this.getStyles("." + (layer.className.split(' ').join('.')) + " rect.bucket");
3786:   Line.prototype.setStyles = function(className) {
3788:     styles = this.getStyles("g." + (className.replace(/\s/g, '.')) + " path.line");
3807:       this.setStyles(layer.className);
chromium.googlesource.com/chromium:native_client_sdk/src/examples/mouselock/mouselock.cc: [ trunk, ]
241: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
324: class MouseLockModule : public pp::Module {
193:   DrawNeedle(&image, foreground_color);
244:     Log("DrawNeedle with NULL image");
chromium.googlesource.com/git/chromium:native_client_sdk/src/examples/mouselock/mouselock.cc: [ trunk, ] Duplicate result
chromium.googlesource.com/chromium/chromium:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ trunk, ] Duplicate result
chromium.googlesource.com/dart/dartium/src:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
chromium.googlesource.com/arc/arc:third_party/android/external/chromium_org/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc: [ master, ] Duplicate result
github.com/google/pepper.js:examples/mouselock/mouselock.cc: [ master, ]
268: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
355: class MouseLockModule : public pp::Module {
217:   DrawNeedle(&image, kForegroundColor);
271:     Log("DrawNeedle with NULL image");
android.googlesource.com/platform/external/jetbrains/JetBrainsRuntime:doc/nashorn/JavaScriptingProgrammersGuide.html: [ master, ]
477: <a name="jsjavaclass" id=jsjavalass"></a>
26: <html class=" regenabled  gecko radius jsenabled regloaded" xmlns="http://www.w3.org/1999/xhtml"><head>
37: <div id="sharepage" class="smallpagetitle"><h1>Java Scripting Programmer's Guide</h1><div class="sharepage">		<div class...(272 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(146 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class...(213 bytes skipped)...guides%2Fscripting%2Fprogrammer_guide%2Findex.html;title=Java%20Scripting%20Programmer%27s%20Guide" class...(211 bytes skipped)...es%2Fscripting%2Fprogrammer_guide%2Findex.html&amp;title=Java%20Scripting%20Programmer%27s%20Guide" class...(198 bytes skipped)...cs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink slashdot" title="Submit this page to Slashdot"></a></td>		<td id="share-blank"> </td></t...(36 bytes skipped)...
132: of the scripting API is the <code>ScriptEngineManager</code> class.
168: public class EvalScript {
171:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
173:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
175:         engine.<span class="methodref">eval</span>("print('Hello, World')");
194: public class EvalFile {
197:         <span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
199:         <span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
201:         engine.<span class="methodref">eval</span>(new java.io.FileReader(args[0]));
246: public class ScriptVars { 
253:         engine.<span class="methodref">put</span>("file", f);
277: public class InvokeScriptFunction {
290:         <span class="classref">Invocable</span> inv = (Invocable) engine;
293:         inv.<span class="methodref">invokeFunction</span>("hello", "Scripting!!" );
307: public class InvokeScriptMethod {
321:         <span class="classref">Invocable</span> inv = (Invocable) engine;
324:         Object obj = engine.<span class="methodref">get</span>("obj");
327:         inv.<span class="methodref">invokeMethod</span>(obj, "hello", "Script Method !!" );
348: public class RunnableImpl {
359:         <span class="classref">Invocable</span> inv = (Invocable) engine;
363:         Runnable r = inv.<span class="methodref">getInterface</span>(Runnable.class);
384: public class RunnableImplObject {
396:         Object obj = engine.<span class="methodref">get</span>("obj");
398:         <span class="classref">Invocable</span> inv = (Invocable) engine;
402:         Runnable r = inv.<span class="methodref">getInterface</span>(obj, Runnable.class);
434: public class MultiScopes {
445:         <span class="classref">ScriptContext</span> newContext = new <span class="classref">SimpleScriptContext</span>();
447:         <span class="classref">Bindings</span> engineScope = newContext.<span class="methodref">getBindings</span>(ScriptContext.ENGINE_SCOPE);
450:         engineScope.<span class="methodref">put</span>("x", "world");
504: In the special case of inner classes, you can either use the JVM fully qualified name, meaning using the dollar sign in the class name, or you can use the dot:
516: ...(2 bytes skipped)...th work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name as it is originally specified, and the internal JVM names for inner class...(167 bytes skipped)... matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads the class...(8 bytes skipped)... out of all dots in the name. This way it can correctly resolve and load even multiply nested inner class...(33 bytes skipped)...this will be slower than using the dollar signs in the name. An alternative way to access the inner class is as a property of the outer class:
523: You can access both static and non-static inner classes. If you want to create an instance of a non-static inner class, remember to pass an instance of its outer class as the first argument to the constructor.
536: ...(64 bytes skipped)...rom a <code>java.lang.Class</code> object. You can obtain one from the other using properties <code>class</code> and <code>static</code> on them.
545:  print("Type's `class` property is same as instance getClass(): " + (a.getClass() === ArrayList.class))
549: You can think of the type object as similar to the class names as used in Java source code: you use them as the
553: between compile-time class expressions and runtime class objects also exists. (Also, Java can't have the equivalent of <code>static</code>
554: property on a <code>Class</code> object since compile-time class expressions are never reified as objects).
570: <span class="functionref">importPackage</span>(java.awt);
572: <span class="functionref">importClass</span>(java.awt.Frame);
581: <p>The <span class="objectref">Packages</span> global variable can
593: avoid that, you may use <span class="functionref">JavaImporter</span>.</p>
600: var SwingGui = new <span class="functionref">JavaImporter</span>(javax.swing,
660: Java anonymous class-like syntax:</p>
695: If a Java class is abstract, you can instantiate an anonymous subclass of it using an argument list that is applicable to any of its public or protected constructors, but...(230 bytes skipped)...
713: which is very similar to Java anonymous inner class definition. On the other hand, if the type is an abstract type with a single abstract method (commo...(210 bytes skipped)...
720: Note that in every one of these cases if you are trying to instantiate an abstract class that has constructors that take some arguments, you can invoke those simply by specifying the argum...(57 bytes skipped)...
736: To extend a concrete Java class, you have to use <code>Java.extend</code> function.
737: <code>Java.extend</code> returns a type object for a subclass of the specified Java class (or implementation of the specified interface) that acts as a script-to-Java adapter for it.  
775: ...(2 bytes skipped)...ode>Java.extend</code> can in fact take a list of multiple types. At most one of the types can be a class, and the rest must
776: be interfaces (the class doesn't have to be the first in the list). You will get back an object that extends the class and 
777: implements all the interfaces. (Obviously, if you only specify interfaces and no class, the object will extend <code>java.lang.Object</code>).
785: to the actual instance being created with <code>new</code>, and not to the whole class. This has some advantages, for example in the
787: ...(8 bytes skipped)...ty, the below code shows that different instantiations of, say, <code>Runnable</code> have the same class regardless of them having
796: print("We share the same class: " + (r1.class === r2.class))
804: We share the same class: true
807: Sometimes, however, you'll want to extend a Java class or implement an interface with implementation bound to the class, not to
808: its instances. Such a need arises, for example, when you need to pass the class for instantiation to an external API; prime example
809: of this is the JavaFX framework where you need to pass an Application class to the FX API and let it instantiate it.
813: denoting a class to extend and interfaces to implement &ndash; can also take one last argument that has to be a Java...(13 bytes skipped)...
814: ...(6 bytes skipped)...erves as the implementation for the methods. In this case, <code>Java.extend()</code> will create a class that has the same
815: constructors as the original class had, as they don't need to take an an extra implementation object parameter. The example below
816: shows how you can create class-bound implementations, and shows that in this case, the implementation classes for different invocations
826: print("We share the same class: " + (r1.class === r2.class))
834: We share the same class: false
839: the implementations are bound to a class, the two classes obviously can't be the same, and we indeed see that the two runnables no
840: longer share the same class &ndash; every invocation of <code>Java.extend()</code> with a class-specific implementation object triggers
841: the creation of a new Java adapter class.
844: Finally, the adapter classes with class-bound implementations can <i>still</i> take an additional constructor parameter to further
846: in a class-based JavaScript implementation object passed to <code>Java.extend</code>, and part in another obje...(29 bytes skipped)...
847: ...(0 bytes skipped)...Whatever functions are provided by the constructor-passed object will override the functions in the class-bound object.
855: print("We share the same class: " + (r1.class === r2.class))
863: We share the same class: true
891: Note that you normally don't even have to use qualified class names in 
897: class.
929: end up with an object of private engine implementation class that implements <code>CharSequence</code> but is not a Java String.
938: abstract class <code>javax.script.AbstractScriptEngine</code>
957: <div class="hr"><hr></div>
973: <div class="hr"><hr></div>
66: <li><span><a href="#jsjavaclass">Accessing Java
80: <li><span><a href="#classBoundImplementations">Class-Bound Implementations
161: Needless to say, you have to handle the exceptions
468: <p>For the most part, accessing Java classes, objects and methods
527: static fields and methods of the classes:
561: classes.</p>
564: // <a href="source/importpackageclass.js">importpackageclass.js</a>
568: // Import Java packages and classes 
587: platform classes can be accessed without the "Packages" prefix.</p>
598: // create JavaImporter with specific packages and classes to import
606:     // classes by unqualified (simple) names.
730: ...(35 bytes skipped)... expects a <code>TimerTask</code> as its argument, so Nashorn creates an instance of a TimerTask subclass and uses the passed function to implement its only abstract method, run(). In this usage though, yo...(130 bytes skipped)...
760: The reason you must use <code>Java.extend()</code> with concrete classes is that with concrete classes, there can be a 
767: If we allowed subclassing of concrete classes with constructor syntax, Nashorn couldn't tell if you're creating a new 
779: <a name="classBoundImplementations" id="classBoundImplementations"></a>
782: The methods shown so far for extending Java classes and implementing interfaces &ndash; passing an implementation JavaScript object 
783: ...(6 bytes skipped)...ction to a constructor, or using <code>Java.extend</code> with <code>new</code> &ndash; all produce classes that take an
768: <code>Thread</code> and passing it a <code>Runnable</code> at this point, or you are subclassing <code>Thread</code> and
github.com/chromium/chromium:third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ]
105:     _updateGaugeNeedle: function (rpm) {
36:         this._updateGaugeNeedle(results.mean);
215:     currentSectionElement.classList.remove('selected');
216:     newSectionElement.classList.add('selected');
109:         var gaugeNeedleElement = document.querySelector('#summarized-results > .gauge .needle');
110:         gaugeNeedleElement.style.setProperty('-webkit-transform', needleRotationValue);
111:         gaugeNeedleElement.style.setProperty('-moz-transform', needleRotationValue);
112:         gaugeNeedleElement.style.setProperty('-ms-transform', needleRotationValue);
113:         gaugeNeedleElement.style.setProperty('transform', needleRotationValue);
chromium.googlesource.com/chromium/src:third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src/third_party:blink/perf_tests/speedometer/resources/main.js: [ master, ] Duplicate result
kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux:drivers/net/can/m_can/m_can.c: [ master, ]
1706: int m_can_class_get_clocks(struct m_can_classdev *m_can_dev)
1722: struct m_can_classdev *m_can_class_allocate_dev(struct device *dev)
1767: int m_can_class_register(struct m_can_classdev *m_can_dev)
1812: int m_can_class_suspend(struct device *dev)
1832: int m_can_class_resume(struct device *dev)
1858: void m_can_class_unregister(struct m_can_classdev *m_can_dev)
1720: EXPORT_SYMBOL_GPL(m_can_class_get_clocks);
1724: 	struct m_can_classdev *class_dev = NULL;
1745: 	net_dev = alloc_candev(sizeof(*class_dev), tx_fifo_size);
1751: 	class_dev = netdev_priv(net_dev);
1752: 	if (!class_dev) {
1757: 	class_dev->net = net_dev;
1758: 	class_dev->dev = dev;
1761: 	m_can_of_parse_mram(class_dev, mram_config_vals);
1763: 	return class_dev;
1765: EXPORT_SYMBOL_GPL(m_can_class_allocate_dev);
1810: EXPORT_SYMBOL_GPL(m_can_class_register);
1830: EXPORT_SYMBOL_GPL(m_can_class_suspend);
1856: EXPORT_SYMBOL_GPL(m_can_class_resume);
1866: EXPORT_SYMBOL_GPL(m_can_class_unregister);
323: static inline u32 m_can_read(struct m_can_classdev *cdev, enum m_can_reg reg)
328: static inline void m_can_write(struct m_can_classdev *cdev, enum m_can_reg reg,
334: static u32 m_can_fifo_read(struct m_can_classdev *cdev,
343: static void m_can_fifo_write(struct m_can_classdev *cdev,
352: static inline void m_can_fifo_write_no_off(struct m_can_classdev *cdev,
358: static u32 m_can_txe_fifo_read(struct m_can_classdev *cdev, u32 fgi, u32 offset)
366: static inline bool m_can_tx_fifo_full(struct m_can_classdev *cdev)
371: void m_can_config_endisable(struct m_can_classdev *cdev, bool enable)
409: static inline void m_can_enable_all_interrupts(struct m_can_classdev *cdev)
415: static inline void m_can_disable_all_interrupts(struct m_can_classdev *cdev)
422: 	struct m_can_classdev *cdev = netdev_priv(net);
440: 	struct m_can_classdev *cdev = netdev_priv(dev);
497: 	struct m_can_classdev *cdev = netdev_priv(dev);
550: 	struct m_can_classdev *cdev = netdev_priv(dev);
607: 	struct m_can_classdev *cdev = netdev_priv(dev);
617: static int m_can_clk_start(struct m_can_classdev *cdev)
633: static void m_can_clk_stop(struct m_can_classdev *cdev)
642: 	struct m_can_classdev *cdev = netdev_priv(dev);
659: 	struct m_can_classdev *cdev = netdev_priv(dev);
733: 	struct m_can_classdev *cdev = netdev_priv(dev);
783: 	struct m_can_classdev *cdev = netdev_priv(dev);
802: 	struct m_can_classdev *cdev = netdev_priv(dev);
810: 	/* Errata workaround for issue "Needless activation of MRAF irq"
847: 	struct m_can_classdev *cdev = netdev_priv(dev);
859: 	struct m_can_classdev *cdev = netdev_priv(dev);
879: 	struct m_can_classdev *cdev = netdev_priv(dev);
912: 	struct m_can_classdev *cdev = netdev_priv(dev);
1013: 	struct m_can_classdev *cdev = netdev_priv(dev);
1086: 	struct m_can_classdev *cdev = netdev_priv(dev);
1198: 	struct m_can_classdev *cdev = netdev_priv(dev);
1228: static int m_can_check_core_release(struct m_can_classdev *cdev)
1256: static bool m_can_niso_supported(struct m_can_classdev *cdev)
1287: static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
1364: 	struct m_can_classdev *cdev = netdev_priv(dev);
1375: 	struct m_can_classdev *cdev = netdev_priv(dev);
1400: 	struct m_can_classdev *cdev = netdev_priv(dev);
1412: static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
1533: 	struct m_can_classdev *cdev = container_of(ws, struct m_can_classdev,
1543: 	struct m_can_classdev *cdev = netdev_priv(dev);
1576: 	struct m_can_classdev *cdev = netdev_priv(dev);
1652: static void m_can_of_parse_mram(struct m_can_classdev *cdev,
1690: void m_can_init_ram(struct m_can_classdev *cdev)
1815: 	struct m_can_classdev *cdev = netdev_priv(ndev);
1835: 	struct m_can_classdev *cdev = netdev_priv(ndev);
github.com/google/kmsan:drivers/net/can/m_can/m_can.c: [ master, ] Duplicate result
github.com/apache/maven-integration-testing:core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4356NoNeedlessRelookupFromActiveCollectionTest.java: [ master, ]
33: public class MavenITmng4356NoNeedlessRelookupFromActiveCollectionTest
37:     public MavenITmng4356NoNeedlessRelookupFromActiveCollectionTest()
github.com/apache/netbeans:platform/openide.windows/test/unit/src/org/openide/windows/PreventNeedlessChangesOfActionMapTest.java: [ master, ]
36: public class PreventNeedlessChangesOfActionMapTest extends NbTestCase
43:     public PreventNeedlessChangesOfActionMapTest(String s) {
49:         res = tc.getLookup().lookup(new Lookup.Template<ActionMap> (ActionMap.class));
56:         ActionMap am = (ActionMap)tc.getLookup().lookup(ActionMap.class);
73:         ActionMap am2 = (ActionMap)tc.getLookup().lookup(ActionMap.class);
42:     /** Creates a new instance of PreventNeedlessChangesOfActionMapTest */
android.googlesource.com/platform/external/swig:Doc/Manual/CPlusPlus11.html: [ master, ]
891: <H3><a name="CPlusPlus11_sizeof">7.2.25 Allow sizeof to work on members of classes without an explicit object</a></H3>
12: <div class="sectiontoc">
91: <div class="code"><pre>
92: class MyClass {
106: Generally you would just ignore them via <tt>%ignore</tt> before parsing the class.
110: <div class="code"><pre>
118: <div class="shell">
133: <div class="code"><pre>
149: <div class="code"><pre>
150: template class std::vector&lt;int&gt;;        // C++03 explicit instantiation in C++
151: extern template class std::vector&lt;int&gt;; // C++11 explicit instantiation suppression in C++
164: <div class="shell">
172: ...(1 bytes skipped)...hey often appear in constructors which are overloaded with alternative approaches to initializing a class,
177: <div class="code"><pre>
179: class Container {
188: <p>Alternatively you could modify the class and add another constructor for initialization by some other means,
191: <div class="code"><pre>
193: class Container {
205: <div class="targetlang"><pre>
210: If you are unable to modify the class being wrapped, consider ignoring the initializer-list constructor and using
214: <div class="code"><pre>
227: class Container {
237: The above makes the wrappers look is as if the class had been declared as follows:
240: <div class="code"><pre>
242: class Container {
261: <div class="code"><pre>
265: class Container {
293: <div class="code"><pre>
312: <div class="targetlang"><pre>
326: <div class="code"><pre>
332: <div class="code"><pre>
347: <div class="code"><pre>
361: <div class="code"><pre>
373: <div class="code"><pre>
381: <div class="code"><pre>
393: <div class="targetlang"><pre>
400: <div class="code"><pre>
412: <div class="code"><pre>
413: class A {
432: ...(3 bytes skipped)...s is parsed correctly, but the additional constructors are not currently added to the derived proxy class in the target language.
440: <div class="code"><pre>
441: class BaseClass {
446: class DerivedClass: public BaseClass {
457: <div class="code"><pre>
458: class SomeClass {
475: <div class="code"><pre>
499: <p>SWIG supports strongly typed enumerations and parses the new <tt>enum class</tt> syntax and forward declarator for the enums, such as:</p>
500: <div class="code"><pre>
501: enum class MyEnum : unsigned int;
508: <div class="code"><pre>
510:   enum class RainbowColors : unsigned int {
514:   enum class WarmColors {
527: However, generally, most scripting languages mangle in the strongly typed enumeration's class name,
531: <div class="targetlang"><pre>
539: <div class="shell"><pre>
544: The strongly typed languages often wrap normal enums into an enum class and so treat normal enums and strongly typed enums the same.
548: <div class="targetlang"><pre>
559: <div class="code"><pre>
569: <div class="code"><pre>
570: class U {
575: class V {
580: class TestClass {
613: <div class="code"><pre>
621: <div class="code"><pre>
628: <div class="code"><pre>
630: class SomeType {
645: <div class="code"><pre>
662: <div class="code"><pre>
685: block, variadic class inheritance and variadic constructor and
688: <div class="code"><pre>
689: template &lt;typename... BaseClasses&gt; class ClassName : public BaseClasses... {
700: <div class="code"><pre>
708: <div class="code"><pre>
721: <div class="code"><pre>
756: <div class="code"><pre>
763: <div class="code"><pre>
771: <div class="code"><pre>
782: <div class="shell"><pre>
791: <div class="code"><pre>
799: <div class="code"><pre>
807: <div class="code"><pre>
819: <div class="code"><pre>
839: <div class="code"><pre>
859: <div class="code"><pre>
884: <div class="code"><pre>
898: <div class="code"><pre>
907: <div class="targetlang"><pre>
922: <div class="code"><pre>
935: <div class="code"><pre>
944: <div class="code"><pre>
955: <div class="code"><pre>
967: <div class="code"><pre>
1041: <div class="code"><pre>
1058: <div class="targetlang"><pre>
1068: <div class="code"><pre>
1073:   template&lt; class T1, class T2 &gt; static int do_it(T1 &amp;, T2 &amp;)  { /*...*/ return 1; }
1078:   template&lt; class T1, class T2 &gt; static int do_it(T1, T2)  { /*...*/ return 2; }
1082: template&lt; class T1, class T2 &gt; int elaborate(T1 A, T2 B) {
1097: <div class="code"><pre>
1106: <div class="targetlang"><pre>
1117: The new <tt>std::result_of</tt> class introduced in the &lt;functional&gt; header provides a generic way to obtain the return type of a f...(47 bytes skipped)...
1120: The technique basically forward declares the <tt>std::result_of</tt> template class, then partially specializes it for the function types of interest.
1124: <div class="code"><pre>
1147: template&lt;class Fun, class Arg&gt;
1159: The empty template instantiation suffices as no proxy class is required for <tt>std::result_of&lt;Fun(Arg)&gt;::type</tt> as this type is really just a <tt>dou...(9 bytes skipped)...
1168: <div class="targetlang"><pre>
41: <li><a href="#CPlusPlus11_sizeof">Allow sizeof to work on members of classes without an explicit object</a>
160: they are intended for compile time initialization of classes using the special <tt>std::initializer_list</tt> type.
276: Needless to say, this approach is very limited, but could be improved upon, but only slightly.
435: ...(38 bytes skipped)... <tt>using</tt> syntax will add the appropriate constructors into the target language proxy derived classes.
600: The effect of explicit constructors and operators has little relevance for the proxy classes as target
980: classes introduced (thread, mutex, locks, condition variables, task). The main reason is that
1004: While SWIG could provide wrappers for the new C++11 regular expressions classes, there is little need as the target languages have their own regular expression facilities.
1036: SWIG supports functor classes in a few languages in a very natural way.
android.googlesource.com/platform/packages/wallpapers/MusicVisualization:src/com/android/musicvis/vis5/Visualization5RS.java: [ master, ]
45:     private int mNeedlePos = 0;
46:     private int mNeedleSpeed = 0;
48:     private int mNeedleMass = 10;
35: class Visualization5RS extends RenderScriptScene {
51:     static class WorldState {
358:         // mNeedleSpeed * 3 is for the movement of the needle, which induces an opposite current
360:         // mNeedlePos + mSpringForceAtOrigin is for the force of the spring pushing the needle back
361:         int netforce = volt - mNeedleSpeed * 3 - (mNeedlePos + mSpringForceAtOrigin) ;
362:         int acceleration = netforce / mNeedleMass;
363:         mNeedleSpeed += acceleration;
364:         mNeedlePos += mNeedleSpeed;
365:         if (mNeedlePos < 0) {
366:             mNeedlePos = 0;
367:             mNeedleSpeed = 0;
368:         } else if (mNeedlePos > 32767) {
369:             if (mNeedlePos > 33333) {
372:             mNeedlePos = 32767;
373:             mNeedleSpeed = 0;
379:         mWorldState.mAngle = 131f - (mNeedlePos / 410f); // ~80 degree range
android.googlesource.com/platform/packages/wallpapers/MusicVisualization:src/com/android/musicvis/vis4/Visualization4RS.java: [ master, ]
45:     private int mNeedlePos = 0;
46:     private int mNeedleSpeed = 0;
48:     private int mNeedleMass = 10;
35: class Visualization4RS extends RenderScriptScene {
51:     static class WorldState {
235:         // mNeedleSpeed * 3 is for the movement of the needle, which induces an opposite current
237:         // mNeedlePos + mSpringForceAtOrigin is for the force of the spring pushing the needle back
238:         int netforce = volt - mNeedleSpeed * 3 - (mNeedlePos + mSpringForceAtOrigin) ;
239:         int acceleration = netforce / mNeedleMass;
240:         mNeedleSpeed += acceleration;
241:         mNeedlePos += mNeedleSpeed;
242:         if (mNeedlePos < 0) {
243:             mNeedlePos = 0;
244:             mNeedleSpeed = 0;
245:         } else if (mNeedlePos > 32767) {
246:             if (mNeedlePos > 33333) {
249:             mNeedlePos = 32767;
250:             mNeedleSpeed = 0;
256:         mWorldState.mAngle = 131f - (mNeedlePos / 410f); // ~80 degree range