Skip to content
Snippets Groups Projects
  1. Mar 28, 2025
    • Devon-Harstrom's avatar
      last thing · 163e5428
      Devon-Harstrom authored
      163e5428
    • Devon HARSTROM's avatar
      Merge branch 'working' into 'main' · 42ba9d44
      Devon HARSTROM authored
      Done Assignment merging into main
      
      See merge request !1
      42ba9d44
    • Devon-Harstrom's avatar
      Made readme better briefly explaining code, testing, refactoring, added test... · 9aa783ae
      Devon-Harstrom authored
      Made readme better briefly explaining code, testing, refactoring, added test badge, image of output.
      
      All Done
      9aa783ae
    • Devon-Harstrom's avatar
      Last refactor I'll do kinda like refactor # 6/7 · 46b6421f
      Devon-Harstrom authored
      I decomposed conditionals since some of them were needlessly nested which makes it harder to read for exampl
      
      getFieldValue had like 4/5 nestings which is way too much
      
      also did it on the other get methods I implemented and added one more test to make sure that after the decomposing of condtionals
      code like this still worked
      
      if(_exceptions.length == 0) {
         printIndented(depth, "  Exceptions-> NONE");
         return;
      }
      
      Done Assignment!
      46b6421f
    • Devon-Harstrom's avatar
      Refactor 5 Again extracted method · 05409eea
      Devon-Harstrom authored
      was doing the identical code for exceptions, modifiers and parameters so, I extracted the method to reduce the repetitive code. I also Pulled out getting field value into its own class since the method was getting pretty large.
      05409eea
    • Devon-Harstrom's avatar
      Refactor 4 done · 19a09202
      Devon-Harstrom authored
      Smaller refactors made I changed the name of t to _type and ct to _componentType as I missed them from naming refactor.
      
      Next I also fixed the warning from Class _class and any other use of Class. Instead using Class <?> since it can be any type even Class<?>[]
      
      Lastly, I quickly changed the for loop in the code from standard for(int i=0; i<length; i++) style to for (Field field: _fields)
      
      Style
      19a09202
    • Devon-Harstrom's avatar
      Done Refactoring 3, Extracted methods again I pulled getConstructor,... · 4233ea16
      Devon-Harstrom authored
      Done Refactoring 3, Extracted methods again I pulled getConstructor, getMethods and getFields. Overall the code was not readable at all and extracting the method allowed for it to be much easier to read
      
      Ran all the tests and everything past as usual
      4233ea16
    • Devon-Harstrom's avatar
      Done Refactoring 2 Renamed Fields/variables · f7daa0c4
      Devon-Harstrom authored
      For example Class c was changed to Class _class
      and Constructors[] cc was changed to _constructors etc.
      The name change is _followed by the proper name
      This make it way easier to read the code rather than my initial lettered variables
      
      For testing I added a test for a simple class with no recursion to see if method and field are in the output
      since I already did Super class and Interface I just checked method and Field to make sure the refactoring didn't change anything
      f7daa0c4
    • Devon-Harstrom's avatar
      First REFACTOR! I extracted two methods in inspector.java I extracted... · 73498fda
      Devon-Harstrom authored
      First REFACTOR! I extracted two methods in inspector.java I extracted getSuperclass and getInterface
      getSuperclass is for getting the immediate super class and interface for interface
      both print the results
      I then look to make sure the output contains the proper words.
      I also tested both with recursive true or false to make sure it still prints even if set to false
      73498fda
    • Devon-Harstrom's avatar
      I finally formatted th output exactly like the Example output, it took a while... · 8b12ddf2
      Devon-Harstrom authored
      I finally formatted th output exactly like the Example output, it took a while to get exactly right, but as the solution I created a method called printIndented which repeats tabs based on recursive depth and add spaces when I needed to
      8b12ddf2
    • Devon-Harstrom's avatar
      Finished part 6 ... hopefully. took me forever to figure out the object.get()... · 3ca50bc5
      Devon-Harstrom authored
      Finished part 6 ... hopefully. took me forever to figure out the object.get() and have the hash print correctly as well as the recursive call
      Also added if the field is an arraystill need to fix formatting as well as add some testing especially testing during the refactors
      3ca50bc5
    • Devon-Harstrom's avatar
      Added part 5 adding methods, basically same thing from part 4 I just changed... · 2953d10e
      Devon-Harstrom authored
      Added part 5 adding methods, basically same thing from part 4 I just changed the variables and added the return type
      
      Next Ill improve the testing, fix the formatting as well as  add part 6
      2953d10e
    • Devon-Harstrom's avatar
      quick add · 45a87492
      Devon-Harstrom authored
      45a87492
    • Devon-Harstrom's avatar
      added the start of a testing file it just creates a simple object and test the... · 76ff306a
      Devon-Harstrom authored
      added the start of a testing file it just creates a simple object and test the output file to see if its the same as my predicted file
      
      for future testing Ill use different types of objects maybe some with inheritance or multiple constructors ect.
      76ff306a
  2. Mar 27, 2025
  3. Mar 26, 2025
  4. Mar 21, 2025
Loading