Skip to content

Commit

Permalink
added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon authored and Leon committed May 8, 2018
1 parent 2459938 commit 3caa6a6
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 78 deletions.
8 changes: 0 additions & 8 deletions META-INF/MANIFEST.MF

This file was deleted.

114 changes: 45 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,45 @@


# Define class MainApplication
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `MainApplication`.
* Define static method named `main`, which has a return type of type `void` and a parameter of type `java.lang.String[]`

# Define class ModifierSpy
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `ModifierSpy`.
* Define non-static method named `isAbstract`, which has a return type of type `boolean` and nullary parameters
* Define non-static method named `getStaticism`, which has a return type of type `String` and nullary parameters
* Define non-static method named `getFinalism`, which has a return type of type `String` and nullary parameters
* Define non-static method named `getAbstractness`, which has a return type of type `String` and nullary parameters
* Define non-static method named `getAccessibility`, which has a return type of type `String` and nullary parameters
* Define non-static method named `validateModifier`, which has a return type of type `String` and a parameter of type `java.lang.String[]`
* Declare non-static field named `modifiers` of type `Class`. The field has `private` accessibility.

# Define class FieldDescriber
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `FieldDescriber`.
* Define non-static method named `toString`, which has a return type of type `String` and nullary parameters
* Declare non-static field named `field` of type `Class`. The field has `private` accessibility.

# Define class ClassSignatureDescriber
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `ClassSignatureDescriber`.
* Define non-static method named `toString`, which has a return type of type `String` and nullary parameters
* Define non-static method named `getPrototype`, which has a return type of type `String` and nullary parameters
* Declare non-static field named `cls` of type `ParameterizedTypeImpl`. The field has `private` accessibility.
* Declare non-static field named `modifiers` of type `Class`. The field has `private` accessibility.

# Define class ParameterDescriber
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `ParameterDescriber`.
* Define non-static method named `toString`, which has a return type of type `String` and nullary parameters
* Declare non-static field named `parameters` of type `Class`. The field has `private` accessibility.
* Declare non-static field named `prefix` of type `Class`. The field has `private` accessibility.

# Define class MethodDescriber
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `MethodDescriber`.
* Define non-static method named `toString`, which has a return type of type `String` and nullary parameters
* Declare non-static field named `method` of type `Class`. The field has `private` accessibility.
* Declare non-static field named `modifierSpy` of type `Class`. The field has `private` accessibility.
* Declare non-static field named `prefix` of type `Class`. The field has `private` accessibility.

# Define class ClassDescriber
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `ClassDescriber`.
* Define static method named `getFullDescription`, which has a return type of type `String` and a parameter of type `java.lang.Class`
* Define static method named `getParameterDescription`, which has a return type of type `String` and a parameter of type `java.lang.reflect.Parameter[]`
* Define static method named `getClassSignatureDescription`, which has a return type of type `String` and a parameter of type `java.lang.Class`
* Define static method named `getFieldDescription`, which has a return type of type `String` and a parameter of type `java.lang.reflect.Field`
* Define static method named `getMethodDescription`, which has a return type of type `String` and a parameter of type `java.lang.reflect.Method`

# Define class ProjectDescriber
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `ProjectDescriber`.
* Define non-static method named `toString`, which has a return type of type `String` and nullary parameters
* Define non-static method named `getClasses`, which has a return type of type `Set` and nullary parameters
* Declare non-static field named `reflections` of type `Class`. The field has `default` accessibility.

# Define class FileWriter
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `FileWriter`.
* Define non-static method named `write`, which has a return type of type `void` and a parameter of type `java.lang.Object`
* Declare non-static field named `out` of type `Class`. The field has `private` accessibility.

# Define class ReadMeGenerator
* Define concrete class in the `com.github.git_leon.class_assembly_generator` package named `ReadMeGenerator`.
* Define non-static method named `getFullDescription`, which has a return type of type `String` and a parameter of type `java.lang.Class`
* Define non-static method named `getParameterDescription`, which has a return type of type `String` and a parameter of type `java.lang.reflect.Parameter[]`
* Define non-static method named `getClassSignatureDescription`, which has a return type of type `String` and a parameter of type `java.lang.Class`
* Define non-static method named `getFieldDescription`, which has a return type of type `String` and a parameter of type `java.lang.reflect.Field`
* Define non-static method named `getMethodDescription`, which has a return type of type `String` and a parameter of type `java.lang.reflect.Method`
* Define non-static method named `writeToReadMe`, which has a return type of type `void` and nullary parameters
* Declare non-static field named `projectDescriber` of type `Class`. The field has `private` accessibility.
# Project Assembly Generator
* This project generates step-by-step descriptions of how to stub out each method of each class in a given project.

## Usage

### Step 1 - Add Maven Repository to `pom.xml`
* Because this dependency is hosted on a private server, not MavenCentral, the `pom.xml` must be configured to search in the proper repository.

```xml
<repositories>
<repository>
<id>git-leon-utils</id>
<url>https://packagecloud.io/git-leon/utils/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
```

### Step 2 - Add Maven Dependency to `pom.xml`
* To use this project, add the dependency to your `pom.xml`

```xml
<dependency>
<groupId>com.github.git-leon</groupId>
<artifactId>project-assembly-generator</artifactId>
<version>1.1</version>
</dependency>
```


### Step 3 - Instantiate a `ReadMeGenerator`
* Instantiate a `ReadMeGenerator` which takes an argument of a `String` representative of the top level package-name.
* Invoke the `writeToReadMe()` method on the instance.
* Open the newly generated `README.md` from the top level directory of the project.

```java
public static void main(String[] args) {
new ReadMeGenerator("com.github").writeToReadMe();
}
```
Binary file added assets/project structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private String getFieldDescription(Field f) {
}

public void writeToReadMe() {
FileWriter writer = new FileWriter("README.md");
FileWriter writer = new FileWriter("README (Generated).md");
for (Class cls : projectDescriber.getClasses()) {
writer.write(getFullDescription(cls));
}
Expand Down

0 comments on commit 3caa6a6

Please sign in to comment.