https://github.com/j-christl/classprinter
Java Utility that lets you print fields, constructors, methods and inner classes of a class using reflection
https://github.com/j-christl/classprinter
java java-utilities reflection
Last synced: 5 months ago
JSON representation
Java Utility that lets you print fields, constructors, methods and inner classes of a class using reflection
- Host: GitHub
- URL: https://github.com/j-christl/classprinter
- Owner: j-christl
- Created: 2014-03-09T14:07:30.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-06-25T18:34:33.000Z (over 8 years ago)
- Last Synced: 2025-01-24T01:11:11.108Z (about 1 year ago)
- Topics: java, java-utilities, reflection
- Language: Java
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ClassPrinter
# General
ClassPrinter is a Java Utility that lets you print fields, constructors, methods and inner classes of a class using reflection.
# How to use?
```
public static void printClass(Class> clazz, boolean comment)
```
# Example
## Code
```java
printClass(java.awt.Point, true);
```
## Output
```java
/**
* java.awt.Point
*/
package java.awt;
public class Point extends Point2D implements Serializable {
/**
* 3 Fields
*/
public int x = 0;
public int y = 0;
private static final long serialVersionUID = -5276940640259749850;
/**
* 3 Constructors
*/
public Point(int arg0, int arg1);
public Point(Point arg0);
public Point();
/**
* 10 Methods
*/
public boolean equals(Object arg0);
public String toString();
@Transient
public Point getLocation();
public double getX();
public double getY();
public void setLocation(Point arg0);
public void setLocation(int arg0, int arg1);
public void setLocation(double arg0, double arg1);
public void move(int arg0, int arg1);
public void translate(int arg0, int arg1);
/**
* 0 Inner Classes
*/
}
```