{"id":3114,"date":"2016-02-09T03:00:10","date_gmt":"2016-02-09T03:00:10","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=3114"},"modified":"2016-02-09T03:00:10","modified_gmt":"2016-02-09T03:00:10","slug":"listing-object-methods-and-class-structure-in-scala","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/","title":{"rendered":"Listing object methods and class structure in scala"},"content":{"rendered":"<p>From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this:<\/p>\n<pre lang=\"scala\">\nList(1,2,3)\n  .getClass.getMethods()\n<\/pre>\n<p>You can get the full method \/ class list by doing the following:<\/p>\n<pre lang=\"scala\">\nList(1,2,3)\n  .map( \n    (method) => { List(method.getDeclaringClass, method.getName) }\n  ).map(println)\n<\/pre>\n<p>Which will give you the following result, neatly sorted by the class hierarchy:<\/p>\n<pre>\nList(class scala.collection.immutable.$colon$colon, head)\nList(class scala.collection.immutable.$colon$colon, tail)\nList(class scala.collection.immutable.$colon$colon, tail)\nList(class scala.collection.immutable.$colon$colon, tail)\nList(class scala.collection.immutable.$colon$colon, productIterator)\nList(class scala.collection.immutable.$colon$colon, productPrefix)\nList(class scala.collection.immutable.$colon$colon, productElement)\nList(class scala.collection.immutable.$colon$colon, productArity)\nList(class scala.collection.immutable.$colon$colon, tl)\nList(class scala.collection.immutable.$colon$colon, isEmpty)\nList(class scala.collection.immutable.$colon$colon, copy$default$1)\nList(class scala.collection.immutable.$colon$colon, copy$default$2)\nList(class scala.collection.immutable.$colon$colon, copy)\nList(class scala.collection.immutable.$colon$colon, tl_$eq)\nList(class scala.collection.immutable.$colon$colon, tl$1)\nList(class scala.collection.immutable.List, exists)\nList(class scala.collection.immutable.List, writeReplace)\nList(class scala.collection.immutable.List, empty)\nList(class scala.collection.immutable.List, empty)\nList(class scala.collection.immutable.List, slice)\nList(class scala.collection.immutable.List, slice)\nList(class scala.collection.immutable.List, slice)\nList(class scala.collection.immutable.List, map)\nList(class scala.collection.immutable.List, toList)\nList(class scala.collection.immutable.List, canBuildFrom)\nList(class scala.collection.immutable.List, apply)\nList(class scala.collection.immutable.List, apply)\nList(class scala.collection.immutable.List, $plus$plus)\nList(class scala.collection.immutable.List, $plus$colon)\nList(class scala.collection.immutable.List, flatMap)\nList(class scala.collection.immutable.List, forall)\nList(class scala.collection.immutable.List, foreach)\nList(class scala.collection.immutable.List, collect)\nList(class scala.collection.immutable.List, hashCode)\nList(class scala.collection.immutable.List, length)\nList(class scala.collection.immutable.List, concat)\nList(class scala.collection.immutable.List, contains)\nList(class scala.collection.immutable.List, iterator)\nList(class scala.collection.immutable.List, find)\nList(class scala.collection.immutable.List, fill)\nList(class scala.collection.immutable.List, fill)\nList(class scala.collection.immutable.List, fill)\nList(class scala.collection.immutable.List, fill)\nList(class scala.collection.immutable.List, fill)\nList(class scala.collection.immutable.List, reverse)\nList(class scala.collection.immutable.List, reverse)\nList(class scala.collection.immutable.List, drop)\nList(class scala.collection.immutable.List, drop)\nList(class scala.collection.immutable.List, drop)\nList(class scala.collection.immutable.List, $colon$colon)\nList(class scala.collection.immutable.List, takeWhile)\nList(class scala.collection.immutable.List, takeWhile)\nList(class scala.collection.immutable.List, takeWhile)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, seq)\nList(class scala.collection.immutable.List, ReusableCBF)\nList(class scala.collection.immutable.List, tabulate)\nList(class scala.collection.immutable.List, tabulate)\nList(class scala.collection.immutable.List, tabulate)\nList(class scala.collection.immutable.List, tabulate)\nList(class scala.collection.immutable.List, tabulate)\nList(class scala.collection.immutable.List, range)\nList(class scala.collection.immutable.List, range)\nList(class scala.collection.immutable.List, iterate)\nList(class scala.collection.immutable.List, scala$collection$LinearSeqOptimized$$super$sameElements)\nList(class scala.collection.immutable.List, unapplySeq)\nList(class scala.collection.immutable.List, sameElements)\nList(class scala.collection.immutable.List, foldLeft)\nList(class scala.collection.immutable.List, reduceLeft)\nList(class scala.collection.immutable.List, reduceRight)\nList(class scala.collection.immutable.List, last)\nList(class scala.collection.immutable.List, dropRight)\nList(class scala.collection.immutable.List, dropRight)\nList(class scala.collection.immutable.List, lengthCompare)\nList(class scala.collection.immutable.List, isDefinedAt)\nList(class scala.collection.immutable.List, isDefinedAt)\nList(class scala.collection.immutable.List, segmentLength)\nList(class scala.collection.immutable.List, indexWhere)\nList(class scala.collection.immutable.List, lastIndexWhere)\nList(class scala.collection.immutable.List, thisCollection)\nList(class scala.collection.immutable.List, thisCollection)\nList(class scala.collection.immutable.List, thisCollection)\nList(class scala.collection.immutable.List, thisCollection)\nList(class scala.collection.immutable.List, toCollection)\nList(class scala.collection.immutable.List, toCollection)\nList(class scala.collection.immutable.List, toCollection)\nList(class scala.collection.immutable.List, toCollection)\nList(class scala.collection.immutable.List, corresponds)\nList(class scala.collection.immutable.List, toSeq)\nList(class scala.collection.immutable.List, toSeq)\nList(class scala.collection.immutable.List, toSeq)\nList(class scala.collection.immutable.List, parCombiner)\nList(class scala.collection.immutable.List, companion)\nList(class scala.collection.immutable.List, $colon$colon$colon)\nList(class scala.collection.immutable.List, reverse_$colon$colon$colon)\nList(class scala.collection.immutable.List, mapConserve)\nList(class scala.collection.immutable.List, take)\nList(class scala.collection.immutable.List, take)\nList(class scala.collection.immutable.List, take)\nList(class scala.collection.immutable.List, takeRight)\nList(class scala.collection.immutable.List, takeRight)\nList(class scala.collection.immutable.List, splitAt)\nList(class scala.collection.immutable.List, dropWhile)\nList(class scala.collection.immutable.List, dropWhile)\nList(class scala.collection.immutable.List, span)\nList(class scala.collection.immutable.List, foldRight)\nList(class scala.collection.immutable.List, stringPrefix)\nList(class scala.collection.immutable.List, toStream)\nList(class scala.collection.immutable.List, toTraversable)\nList(class scala.collection.immutable.List, groupBy)\nList(class scala.collection.immutable.List, toIterable)\nList(class scala.collection.immutable.List, view)\nList(class scala.collection.immutable.List, view)\nList(class scala.collection.immutable.List, view)\nList(class scala.collection.immutable.List, view)\nList(class scala.collection.AbstractSeq, prefixLength)\nList(class scala.collection.AbstractSeq, lift)\nList(class scala.collection.AbstractSeq, orElse)\nList(class scala.collection.AbstractSeq, equals)\nList(class scala.collection.AbstractSeq, toString)\nList(class scala.collection.AbstractSeq, indexOf)\nList(class scala.collection.AbstractSeq, indexOf)\nList(class scala.collection.AbstractSeq, startsWith)\nList(class scala.collection.AbstractSeq, startsWith)\nList(class scala.collection.AbstractSeq, endsWith)\nList(class scala.collection.AbstractSeq, lastIndexOf)\nList(class scala.collection.AbstractSeq, lastIndexOf)\nList(class scala.collection.AbstractSeq, size)\nList(class scala.collection.AbstractSeq, diff)\nList(class scala.collection.AbstractSeq, runWith)\nList(class scala.collection.AbstractSeq, permutations)\nList(class scala.collection.AbstractSeq, combinations)\nList(class scala.collection.AbstractSeq, reverseMap)\nList(class scala.collection.AbstractSeq, patch)\nList(class scala.collection.AbstractSeq, updated)\nList(class scala.collection.AbstractSeq, padTo)\nList(class scala.collection.AbstractSeq, union)\nList(class scala.collection.AbstractSeq, intersect)\nList(class scala.collection.AbstractSeq, distinct)\nList(class scala.collection.AbstractSeq, reverseIterator)\nList(class scala.collection.AbstractSeq, indexOfSlice)\nList(class scala.collection.AbstractSeq, indexOfSlice)\nList(class scala.collection.AbstractSeq, lastIndexOfSlice)\nList(class scala.collection.AbstractSeq, lastIndexOfSlice)\nList(class scala.collection.AbstractSeq, containsSlice)\nList(class scala.collection.AbstractSeq, sortWith)\nList(class scala.collection.AbstractSeq, sorted)\nList(class scala.collection.AbstractSeq, indices)\nList(class scala.collection.AbstractSeq, sortBy)\nList(class scala.collection.AbstractSeq, $colon$plus)\nList(class scala.collection.AbstractSeq, apply$mcZD$sp)\nList(class scala.collection.AbstractSeq, apply$mcDD$sp)\nList(class scala.collection.AbstractSeq, apply$mcFD$sp)\nList(class scala.collection.AbstractSeq, apply$mcID$sp)\nList(class scala.collection.AbstractSeq, apply$mcJD$sp)\nList(class scala.collection.AbstractSeq, apply$mcVD$sp)\nList(class scala.collection.AbstractSeq, apply$mcZF$sp)\nList(class scala.collection.AbstractSeq, apply$mcDF$sp)\nList(class scala.collection.AbstractSeq, apply$mcFF$sp)\nList(class scala.collection.AbstractSeq, apply$mcIF$sp)\nList(class scala.collection.AbstractSeq, apply$mcJF$sp)\nList(class scala.collection.AbstractSeq, apply$mcVF$sp)\nList(class scala.collection.AbstractSeq, apply$mcZI$sp)\nList(class scala.collection.AbstractSeq, apply$mcDI$sp)\nList(class scala.collection.AbstractSeq, apply$mcFI$sp)\nList(class scala.collection.AbstractSeq, apply$mcII$sp)\nList(class scala.collection.AbstractSeq, apply$mcJI$sp)\nList(class scala.collection.AbstractSeq, apply$mcVI$sp)\nList(class scala.collection.AbstractSeq, apply$mcZJ$sp)\nList(class scala.collection.AbstractSeq, apply$mcDJ$sp)\nList(class scala.collection.AbstractSeq, apply$mcFJ$sp)\nList(class scala.collection.AbstractSeq, apply$mcIJ$sp)\nList(class scala.collection.AbstractSeq, apply$mcJJ$sp)\nList(class scala.collection.AbstractSeq, apply$mcVJ$sp)\nList(class scala.collection.AbstractSeq, compose)\nList(class scala.collection.AbstractSeq, andThen)\nList(class scala.collection.AbstractSeq, andThen)\nList(class scala.collection.AbstractSeq, indexWhere)\nList(class scala.collection.AbstractSeq, lastIndexWhere)\nList(class scala.collection.AbstractSeq, applyOrElse)\nList(class scala.collection.AbstractSeq, view)\nList(class scala.collection.AbstractSeq, view)\nList(class scala.collection.AbstractIterable, copyToArray)\nList(class scala.collection.AbstractIterable, canEqual)\nList(class scala.collection.AbstractIterable, zip)\nList(class scala.collection.AbstractIterable, toIterable)\nList(class scala.collection.AbstractIterable, toIterator)\nList(class scala.collection.AbstractIterable, grouped)\nList(class scala.collection.AbstractIterable, sliding)\nList(class scala.collection.AbstractIterable, sliding)\nList(class scala.collection.AbstractIterable, zipWithIndex)\nList(class scala.collection.AbstractIterable, zipAll)\nList(class scala.collection.AbstractTraversable, nonEmpty)\nList(class scala.collection.AbstractTraversable, copyToArray)\nList(class scala.collection.AbstractTraversable, copyToArray)\nList(class scala.collection.AbstractTraversable, mkString)\nList(class scala.collection.AbstractTraversable, mkString)\nList(class scala.collection.AbstractTraversable, mkString)\nList(class scala.collection.AbstractTraversable, fold)\nList(class scala.collection.AbstractTraversable, flatten)\nList(class scala.collection.AbstractTraversable, filterNot)\nList(class scala.collection.AbstractTraversable, withFilter)\nList(class scala.collection.AbstractTraversable, count)\nList(class scala.collection.AbstractTraversable, min)\nList(class scala.collection.AbstractTraversable, max)\nList(class scala.collection.AbstractTraversable, toArray)\nList(class scala.collection.AbstractTraversable, init)\nList(class scala.collection.AbstractTraversable, filter)\nList(class scala.collection.AbstractTraversable, headOption)\nList(class scala.collection.AbstractTraversable, toSet)\nList(class scala.collection.AbstractTraversable, toSet)\nList(class scala.collection.AbstractTraversable, newBuilder)\nList(class scala.collection.AbstractTraversable, sum)\nList(class scala.collection.AbstractTraversable, genericBuilder)\nList(class scala.collection.AbstractTraversable, repr)\nList(class scala.collection.AbstractTraversable, toTraversable)\nList(class scala.collection.AbstractTraversable, groupBy)\nList(class scala.collection.AbstractTraversable, isTraversableAgain)\nList(class scala.collection.AbstractTraversable, hasDefiniteSize)\nList(class scala.collection.AbstractTraversable, $plus$plus$colon)\nList(class scala.collection.AbstractTraversable, $plus$plus$colon)\nList(class scala.collection.AbstractTraversable, partition)\nList(class scala.collection.AbstractTraversable, scan)\nList(class scala.collection.AbstractTraversable, scanLeft)\nList(class scala.collection.AbstractTraversable, scanRight)\nList(class scala.collection.AbstractTraversable, lastOption)\nList(class scala.collection.AbstractTraversable, sliceWithKnownDelta)\nList(class scala.collection.AbstractTraversable, sliceWithKnownBound)\nList(class scala.collection.AbstractTraversable, tails)\nList(class scala.collection.AbstractTraversable, inits)\nList(class scala.collection.AbstractTraversable, to)\nList(class scala.collection.AbstractTraversable, reversed)\nList(class scala.collection.AbstractTraversable, collectFirst)\nList(class scala.collection.AbstractTraversable, $div$colon)\nList(class scala.collection.AbstractTraversable, $colon$bslash)\nList(class scala.collection.AbstractTraversable, reduceLeftOption)\nList(class scala.collection.AbstractTraversable, reduceRightOption)\nList(class scala.collection.AbstractTraversable, reduce)\nList(class scala.collection.AbstractTraversable, reduceOption)\nList(class scala.collection.AbstractTraversable, aggregate)\nList(class scala.collection.AbstractTraversable, product)\nList(class scala.collection.AbstractTraversable, maxBy)\nList(class scala.collection.AbstractTraversable, minBy)\nList(class scala.collection.AbstractTraversable, copyToBuffer)\nList(class scala.collection.AbstractTraversable, toIndexedSeq)\nList(class scala.collection.AbstractTraversable, toBuffer)\nList(class scala.collection.AbstractTraversable, toVector)\nList(class scala.collection.AbstractTraversable, toMap)\nList(class scala.collection.AbstractTraversable, toMap)\nList(class scala.collection.AbstractTraversable, addString)\nList(class scala.collection.AbstractTraversable, addString)\nList(class scala.collection.AbstractTraversable, addString)\nList(class scala.collection.AbstractTraversable, par)\nList(class scala.collection.AbstractTraversable, unzip)\nList(class scala.collection.AbstractTraversable, unzip3)\nList(class scala.collection.AbstractTraversable, transpose)\nList(class java.lang.Object, wait)\nList(class java.lang.Object, wait)\nList(class java.lang.Object, wait)\nList(class java.lang.Object, getClass)\nList(class java.lang.Object, notify)\nList(class java.lang.Object, notifyAll)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) => { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Listing object methods and class structure in scala&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[4],"tags":[480,482,485],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) =&gt; { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"gary\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Gary Sieling - Software Engineer\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Listing object methods and class structure in scala - Gary Sieling\" \/>\n\t\t<meta property=\"og:description\" content=\"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) =&gt; { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2016-02-09T03:00:10+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2016-02-09T03:00:10+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Listing object methods and class structure in scala - Gary Sieling\" \/>\n\t\t<meta name=\"twitter:description\" content=\"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) =&gt; { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#blogposting\",\"name\":\"Listing object methods and class structure in scala - Gary Sieling\",\"headline\":\"Listing object methods and class structure in scala\",\"author\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#organization\"},\"datePublished\":\"2016-02-09T03:00:10+00:00\",\"dateModified\":\"2016-02-09T03:00:10+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#webpage\"},\"articleSection\":\"Code Examples, scala, scala-collections, scala-examples\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.garysieling.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/#listItem\",\"name\":\"Code Examples\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/#listItem\",\"position\":2,\"name\":\"Code Examples\",\"item\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#listItem\",\"name\":\"Listing object methods and class structure in scala\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#listItem\",\"position\":3,\"name\":\"Listing object methods and class structure in scala\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/#listItem\",\"name\":\"Code Examples\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#organization\",\"name\":\"Gary Sieling\",\"description\":\"Software Engineer\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/\",\"name\":\"gary\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0be925276d848ffe98a6a9dc8cf33e67?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"gary\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#webpage\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/\",\"name\":\"Listing object methods and class structure in scala - Gary Sieling\",\"description\":\"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \\\/ class list by doing the following: List(1,2,3) .map( (method) => { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/listing-object-methods-and-class-structure-in-scala\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\"},\"datePublished\":\"2016-02-09T03:00:10+00:00\",\"dateModified\":\"2016-02-09T03:00:10+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/\",\"name\":\"Gary Sieling\",\"description\":\"Software Engineer\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Listing object methods and class structure in scala - Gary Sieling","description":"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) => { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly","canonical_url":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#blogposting","name":"Listing object methods and class structure in scala - Gary Sieling","headline":"Listing object methods and class structure in scala","author":{"@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author"},"publisher":{"@id":"https:\/\/www.garysieling.com\/blog\/#organization"},"datePublished":"2016-02-09T03:00:10+00:00","dateModified":"2016-02-09T03:00:10+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#webpage"},"isPartOf":{"@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#webpage"},"articleSection":"Code Examples, scala, scala-collections, scala-examples"},{"@type":"BreadcrumbList","@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.garysieling.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/#listItem","name":"Code Examples"}},{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/#listItem","position":2,"name":"Code Examples","item":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#listItem","name":"Listing object methods and class structure in scala"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#listItem","position":3,"name":"Listing object methods and class structure in scala","previousItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/#listItem","name":"Code Examples"}}]},{"@type":"Organization","@id":"https:\/\/www.garysieling.com\/blog\/#organization","name":"Gary Sieling","description":"Software Engineer","url":"https:\/\/www.garysieling.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author","url":"https:\/\/www.garysieling.com\/blog\/author\/gary\/","name":"gary","image":{"@type":"ImageObject","@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/0be925276d848ffe98a6a9dc8cf33e67?s=96&d=identicon&r=g","width":96,"height":96,"caption":"gary"}},{"@type":"WebPage","@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#webpage","url":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/","name":"Listing object methods and class structure in scala - Gary Sieling","description":"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) => { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.garysieling.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/#breadcrumblist"},"author":{"@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author"},"creator":{"@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author"},"datePublished":"2016-02-09T03:00:10+00:00","dateModified":"2016-02-09T03:00:10+00:00"},{"@type":"WebSite","@id":"https:\/\/www.garysieling.com\/blog\/#website","url":"https:\/\/www.garysieling.com\/blog\/","name":"Gary Sieling","description":"Software Engineer","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.garysieling.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Gary Sieling - Software Engineer","og:type":"article","og:title":"Listing object methods and class structure in scala - Gary Sieling","og:description":"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) =&gt; { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly","og:url":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/","article:published_time":"2016-02-09T03:00:10+00:00","article:modified_time":"2016-02-09T03:00:10+00:00","twitter:card":"summary_large_image","twitter:title":"Listing object methods and class structure in scala - Gary Sieling","twitter:description":"From scala, you can list all the methods on an object (essentially the same as pressing tab in the repl), by doing this: List(1,2,3) .getClass.getMethods() You can get the full method \/ class list by doing the following: List(1,2,3) .map( (method) =&gt; { List(method.getDeclaringClass, method.getName) } ).map(println) Which will give you the following result, neatly"},"aioseo_meta_data":{"post_id":"3114","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2023-02-04 16:36:31","updated":"2026-07-06 01:26:32","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.garysieling.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/\" title=\"Code Examples\">Code Examples<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tListing object methods and class structure in scala\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.garysieling.com\/blog"},{"label":"Code Examples","link":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/"},{"label":"Listing object methods and class structure in scala","link":"https:\/\/www.garysieling.com\/blog\/listing-object-methods-and-class-structure-in-scala\/"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3114"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=3114"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3114\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=3114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=3114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=3114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}