This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CounterComponentController { | |
public CounterComponentListener listener { get; set; } | |
private Integer count; | |
public CounterComponentController() { | |
count = 0; | |
} | |
public Integer getCount() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AComponentController { | |
public class AClass { | |
} | |
public String aString { get; set; } | |
public Integer anInteger { get; set; } | |
public Boolean aBoolean { get; set; } | |
public sObject anObject { get; set; } | |
public Object[] anArray { get; set; } | |
public Map<Object, Object> aMap { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="file-input" type="file" /> | |
<input id="upload-button" type="button" value="Upload" onclick="uploadFile();"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InnerClassCounterPageController { | |
private Boolean showAlert; | |
public InnerClassCounterPageController() { | |
showAlert = false; | |
} | |
public Boolean getShowAlert() { | |
return showAlert; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
private class OpportunityTriggerTests { | |
private static void createOpportunities(...) { | |
// ... | |
} | |
private static void createProducts(...) { | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpRequest req = new HttpRequest(); | |
req.setEndpoint('https://api.example.com/path'); | |
req.setMethod('GET'); | |
String username = 'username'; | |
String password = 'password'; | |
Blob headerValue = Blob.valueOf(username + ':' + password); | |
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue); | |
req.setHeader('Authorization', authorizationHeader); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Account { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShadowingExample { | |
private Integer shadow; | |
public ShadowingExample(Integer shadow) { | |
this.shadow = shadow; | |
} | |
public Integer getShadow() { | |
return shadow; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Examples { // Begin class scope | |
Integer classVariable; | |
void instanceMethod() { // Begin method scope | |
Integer methodVariable; | |
// We can access classVariable because it is defined in a parent scope | |
classVariable = 0; // OK! | |
// We can access methodVariable because it's defined in the current scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AdvancedPieService { | |
public String getFlavour() { | |
return Pie_Settings__c.getInstance().Flavour__c; | |
} | |
} |
OlderNewer