Skip to content

Instantly share code, notes, and snippets.

@fivekWBassMachine
Created October 25, 2020 19:41
Show Gist options
  • Save fivekWBassMachine/07eb5d96551c7def44af3b9529d3c7ef to your computer and use it in GitHub Desktop.
Save fivekWBassMachine/07eb5d96551c7def44af3b9529d3c7ef to your computer and use it in GitHub Desktop.
My Programming Styleguide
package com.example;
import com.example.Class;
/**
* An example class to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
*/
public class Class extends Class implements Class {
private Datatype var;
protected Datatype var;
public Datatype var;
private static Datatype method(Datatype var) {
Datatype var = new Datatype();
// Do Stuff
return var;
}
private static Datatype method(Datatype var) {
Datatype var = new Datatype();
// Do Stuff
return var;
}
/**
* method does...
*
* <p>
* Optional detailed description
* </p>
*
* @param var The datatype
* @return The datatype
*
* @since major.minor.patch
*/
protected static Datatype method(Datatype var) {
Datatype var = new Datatype();
// Do Stuff
return var;
}
/**
* method does...
*
* <p>
* Optional detailed description
* </p>
*
* @param var The datatype
* @return The datatype
*
* @since major.minor.patch
*/
protected static Datatype method(Datatype var) {
Datatype var = new Datatype();
// Do Stuff
return var;
}
/**
* method does...
*
* <p>
* Optional detailed description
* </p>
*
* @param var The datatype
* @return The datatype
*
* @since major.minor.patch
*/
public static Datatype method(Datatype var) {
Datatype var = new Datatype();
// Do Stuff
return var;
}
/**
* method does...
*
* <p>
* Optional detailed description
* </p>
*
* @param var The datatype
* @return The datatype
*
* @since major.minor.patch
*/
public static Datatype method(Datatype var, Datatype var) {
Datatype var = new Datatype();
// Do Stuff
return var;
}
private Class() {
}
private Class() {
}
/**
* @since major.minor.patch
*/
protected Class() {
}
/**
* @since major.minor.patch
*/
protected Class() {
}
/**
* @since major.minor.patch
*/
public Class() {
}
/**
* @since major.minor.patch
*/
public Class() {
}
/**
* toString returns this class pretty printed.
*
* <p>
* Detailed description
* </p>
*
* @return The pretty printed class.
*
* @since 1.0.0
*/
@Override
private String toString() {
}
/**
* toString returns this class pretty printed.
*
* <p>
* Detailed description
* </p>
*
* @return The pretty printed class.
*
* @since 1.0.0
*/
@Override
private String toString() {
}
/**
* toString returns this class pretty printed.
*
* <p>
* Detailed description
* </p>
*
* @return The pretty printed class.
*
* @since 1.0.0
*/
@Override
protected String toString() {
}
/**
* toString returns this class pretty printed.
*
* <p>
* Detailed description
* </p>
*
* @return The pretty printed class.
*
* @since 1.0.0
*/
@Override
protected String toString() {
}
/**
* toString returns this class pretty printed.
*
* <p>
* Detailed description
* </p>
*
* @return The pretty printed class.
*
* @since 1.0.0
*/
@Override
public String toString() {
}
/**
* toString returns this class pretty printed.
*
* <p>
* Detailed description
* </p>
*
* @return The pretty printed class.
*
* @since 1.0.0
*/
@Override
public String toString() {
}
/**
* An example class to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
private interface Class {
}
/**
* An example class to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
protected interface Class {
}
/**
* An example class to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
public interface Class {
}
/**
* An example interface to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
private interface Interface {
}
/**
* An example interface to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
protected interface Interface {
}
/**
* An example interface to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
public interface Interface {
}
/**
* An example enum to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
private enum Enum {
}
/**
* An example enum to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
protected enum Enum {
}
/**
* An example enum to show the styleguide.
*
* <p>
* Detailed description
* </p>
*
* @author name
* @version major.minor.patch
* @since major.minor.patch
*/
public enum Enum {
}
}
@fivekWBassMachine
Copy link
Author

fivekWBassMachine commented Oct 25, 2020

package

imports*1

class declaration

    variables*2

    static methods*2,3

    constructors*2,4

    overridden methods*2,3

    methods*2,3

    inner classes*2

    inner interfaces*2

    inner enums*2

*1) auto formatted by intellij
*2) private, protected, public
*3) overloaded methods without empty line between
*4) constructors are treated like overloaded methods (*3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment