Skip to content

Commit 4e04255

Browse files
author
TheShadow
committed
Small API Change
Changed how types work. Instead of doing PasteObject(new PasteHTML()) , it is now PasteObject(PasteType.TYPE_HTML)
1 parent a20dc2a commit 4e04255

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

src/com/darkprograms/pastehtml/types/PasteHTML.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44
* PasteHTML class representing the type HTML
55
*/
66
public class PasteHTML extends PasteType {
7+
8+
protected PasteHTML() {
9+
10+
}
11+
712
}

src/com/darkprograms/pastehtml/types/PasteMD.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55
*/
66
public class PasteMD extends PasteType {
77

8+
protected PasteMD() {
9+
10+
}
11+
812

913
}

src/com/darkprograms/pastehtml/types/PasteText.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
* PasteText class representing a text paste
55
*/
66
public class PasteText extends PasteType {
7+
protected PasteText() {
8+
9+
}
10+
711
}

src/com/darkprograms/pastehtml/types/PasteType.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,18 @@ protected PasteType() {
1212

1313
}
1414

15+
/**
16+
* Type for posting the object as HTML
17+
*/
18+
public static final PasteHTML TYPE_HTML = new PasteHTML();
19+
/**
20+
* Type for posting the object as text
21+
*/
22+
public static final PasteText TYPE_TEXT = new PasteText();
23+
/**
24+
* Type for posting the object as Markdown
25+
*/
26+
public static final PasteMD TYPE_MARKDOWN = new PasteMD();
27+
1528

1629
}

0 commit comments

Comments
 (0)